Commit 0db204af authored by 赵杰's avatar 赵杰

修复月份数据不一致bug

parent 840e95b9
......@@ -280,6 +280,8 @@ class UserCustomerResultAdaptor(UserCustomerDataAdaptor):
return_ratio_df["date"] = return_ratio_df.index
return_group = return_ratio_df.groupby(return_ratio_df["date"].apply(year_month))
month_last_return_ratio = return_group.last()["cum_return_ratio"]
month_sum = month_sum[month_sum.index.isin(month_last_return_ratio.index.values)]
month_result = pd.DataFrame({"date": month_sum.index, "profit": month_sum.values, "ratio": month_last_return_ratio.values})
month_result["datetime"] = pd.to_datetime(month_result["date"])
month_result.sort_values(by="datetime", inplace=True)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment