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