Skip to content

Commit

Permalink
Update dump_bin.py (microsoft#1273)
Browse files Browse the repository at this point in the history
dump_fix data that not in calendar_list, throw error:
```
NaT is not in list
```
  • Loading branch information
lerit authored Nov 4, 2022
1 parent d724a55 commit 524b5c0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/dump_bin.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,9 @@ def _data_to_bin(self, df: pd.DataFrame, calendar_list: List[pd.Timestamp], feat
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):
Expand Down

0 comments on commit 524b5c0

Please sign in to comment.