зеркало из https://github.com/microsoft/qlib.git
Update dump_bin.py (#1273)
dump_fix data that not in calendar_list, throw error: ``` NaT is not in list ```
This commit is contained in:
Родитель
67d618d4b2
Коммит
2fae407b19
|
@ -219,6 +219,9 @@ class DumpDataBase:
|
|||
return
|
||||
# align index
|
||||
_df = self.data_merge_calendar(df, calendar_list)
|
||||
if _df.empty:
|
||||
logger.warning(f"{features_dir.name} data is not in calendars")
|
||||
return
|
||||
# used when creating a bin file
|
||||
date_index = self.get_datetime_index(_df, calendar_list)
|
||||
for field in self.get_dump_fields(_df.columns):
|
||||
|
|
Загрузка…
Ссылка в новой задаче