-
Notifications
You must be signed in to change notification settings - Fork 5k
Description
🐛 Bug Description
To Reproduce
Steps to reproduce the behavior:
1.python scripts/data_collector/yahoo/collector.py normalize_data --source_dir ~/.qlib/stock_data/source/cn_data --normalize_dir ~/.qlib/stock_data/normalize/cn_data --region CN --interval 1d
2.我已经下载了cn_data数据,normalize 过程中,在第341 sh600489.csv 发生错误
Expected Behavior
Screenshot
File "E:\Data\PROGRAM\Python\source\qlib\scripts\data_collector\yahoo\collector.py", line 395, in normalize_yahoo
df.index = pd.to_datetime(df.index)
...
ValueError: unconverted data remains when parsing with format "%Y-%m-%d": " 09:30:00+08:00", at position 1343. You might want to try:
- passing format
if your strings have a consistent format;
- passing format='ISO8601'
if your strings are all ISO8601 but not necessarily in exactly the same format;
- passing format='mixed'
, and the format will be inferred for each element individually. You might want to use dayfirst
alongside this.
Environment
Note: User could run cd scripts && python collect_info.py all
under project directory to get system information
and paste them here directly.
- Qlib version:0.9.7
- Python version: 3.12.9
- OS (
Windows
,Linux
,MacOS
): windows
下载的原始数据
sh600468.csv
sh600469.csv
归一后的数据
- Commit number (optional, please provide it if you are using the dev version):