mirror of
https://github.com/microsoft/qlib.git
synced 2026-06-06 05:51:17 +08:00
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:
@@ -219,6 +219,9 @@ class DumpDataBase:
|
|||||||
return
|
return
|
||||||
# align index
|
# align index
|
||||||
_df = self.data_merge_calendar(df, calendar_list)
|
_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
|
# used when creating a bin file
|
||||||
date_index = self.get_datetime_index(_df, calendar_list)
|
date_index = self.get_datetime_index(_df, calendar_list)
|
||||||
for field in self.get_dump_fields(_df.columns):
|
for field in self.get_dump_fields(_df.columns):
|
||||||
|
|||||||
Reference in New Issue
Block a user