From 5808c9cdd1b44107f273136070113c209938476b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=80=C3=AE=C3=97=C3=9A=C3=95=C3=B1?= Date: Thu, 18 Aug 2022 21:20:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=95=E4=BA=8B=E4=BB=B6=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E6=BC=8F=E6=96=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/api_v1/endpoints/query.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/api_v1/endpoints/query.py b/api/api_v1/endpoints/query.py index e849c91..d85df36 100644 --- a/api/api_v1/endpoints/query.py +++ b/api/api_v1/endpoints/query.py @@ -1556,8 +1556,8 @@ async def guide_model( for k, nedf in df.groupby("date"): ste_k = {} for kk, ste_df in nedf.groupby(group_str): - ste_df.reset_index(drop=True, inplace=True) - ste_k[str(kk)] = int(ste_df['values'][0]) + value_list = ste_df.iloc[:, -1].to_list() + ste_k[str(kk)] = int(sum(value_list)) for ste in step_list: if ste not in list(ste_k.keys()): ste_k[ste] = 0