python 2.7 compatibility
This commit is contained in:
parent
f0d4ba986d
commit
fe101be5d8
1 changed files with 1 additions and 1 deletions
|
|
@ -33,7 +33,7 @@ def index():
|
||||||
|
|
||||||
@app.route('/data/<string:nation>')
|
@app.route('/data/<string:nation>')
|
||||||
def data(nation):
|
def data(nation):
|
||||||
data = '{' + f'labels:{df2.index.astype(int).tolist()}, series: {df2[nation].astype(float).tolist()}' + '}'
|
data = '{' + 'labels:{}, series: {}'.format(df2.index.astype(int).tolist(), df2[nation].astype(float).tolist()) + '}'
|
||||||
return jsonify({'results':df2[nation].astype(float).tolist(), 'labels':df2.index.astype(float).tolist()})
|
return jsonify({'results':df2[nation].astype(float).tolist(), 'labels':df2.index.astype(float).tolist()})
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue