ValueError: The name datetime occurs multiple times, use a level number
仅在workflow中将Alpha158改成Alpha360后,「prediction, backtest & analysis」环节出现ValueError: The name datetime occurs multiple times, use a level number
Similar problem, when use: analysis_position.rank_label_graph(positions, label_df)
It was caused in line 171, qlib/contrib/report/analysis_position/parse_position.py
_position_df = parse_position(position)
This generate dataframe with multiindex ['instruments','datetime']
if calculate_label_rank:
_position_df = _calculate_label_rank(_position_df)
Dataframe transfer to multiindex ['datetime','instruments','datetime'] , and caused the above error
Droplevel could fix it: _position_df = _position_df.droplevel(level=0, )
Hi, @Yuhang-Harry-Gao @EnjoyLeole I'd like to know how to reproduce the problem.
This issue is likely caused by the ProcessInf Processor, and it is very likely related to how the datetime_groupby_apply function processes the data. My dataset does not contain any Infinity values, but after applying this Processor, an additional column for datetime appears.
This issue is likely caused by the ProcessInf Processor, and it is very likely related to how the datetime_groupby_apply function processes the data. My dataset does not contain any Infinity values, but after applying this Processor, an additional column for datetime appears.
I think you're right, will this PR solve your problem?