')
def get_detail():
# 省略df的创建过程
jdata = df.to_json(orient='records', force_ascii=False)...# 返回值为一个字符串
return jdata
@app.route('/detailjson')
def get_detail_json():
# 省略df的创建过程...')
# @cross_origin(supports_credentials=True)
def get_detail():
# 省略df的创建过程
jdata = df.to_json...", "第2", "第3", "第4", "第5", "第6"],
"data": [5, 20, 36, 10, 10, 20]}
else:
bar_data = {..."categories": ["第1", "第2", "第3", "第4", "第5", "第6"],
"data": [0, 0, 0, 0, 0, 0]}
print("****"