diff --git a/api/api_v1/endpoints/query.py b/api/api_v1/endpoints/query.py index deedff9..1d5d0b4 100644 --- a/api/api_v1/endpoints/query.py +++ b/api/api_v1/endpoints/query.py @@ -1072,7 +1072,9 @@ async def scatter_model( number_str=str(number_int)+'%' list_p.append(number_str) resp['list'][dt] = {'总体': {'n': [labels_dict.get(i, 0) for i in labels], 'total': total, - 'p': [round(labels_dict.get(i, 0) * 100 / total, 2) for i in labels]}} + 'p': list_p}} + #resp['list'][dt] = {'总体': {'n': [labels_dict.get(i, 0) for i in labels], 'total': total, + # 'p': [round(labels_dict.get(i, 0) * 100 / total, 2) for i in labels]}} return schemas.Msg(code=0, msg='ok', data=resp) # bins_s = pd.cut(tmp_df['values'], bins=bins,