-
Notifications
You must be signed in to change notification settings - Fork 3.1k
ValueError: The name datetime occurs multiple times, use a level number #1893
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Similar problem, when use: It was caused in line 171, qlib/contrib/report/analysis_position/parse_position.py
This generate dataframe with multiindex ['instruments','datetime']
Dataframe transfer to multiindex ['datetime','instruments','datetime'] , and caused the above error Droplevel could fix it: |
- adapt pandas >= 1.5.0 - add group_keys when the result from apply is a like-indexed Series or DataFrame
- adapt pandas >= 1.5.0 - add group_keys when the result from apply is a like-indexed Series or DataFrame
Hi, @Yuhang-Harry-Gao @EnjoyLeole |
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? |
仅在workflow中将Alpha158改成Alpha360后,「prediction, backtest & analysis」环节出现ValueError: The name datetime occurs multiple times, use a level number
The text was updated successfully, but these errors were encountered: