diff --git a/api/api_v1/endpoints/query.py b/api/api_v1/endpoints/query.py index 1cfc1ba..40ea2f7 100644 --- a/api/api_v1/endpoints/query.py +++ b/api/api_v1/endpoints/query.py @@ -356,7 +356,7 @@ async def retention_model(request: Request, tmp['n_outflow'] = [] tmp['d0'] = 0 for rt, rd in retention_avg_dict.items(): - tmp['d0'] = tmp['d0'] + rd['cnt0'] + tmp['d0'] = int(df['cnt0'].sum()) n = round(rd['cntn'] * 100 / rd['cnt0'],2) n = 0 if np.isnan(n) else n tmp['p'].append(n)