MCPcopy Index your code
hub / github.com/microsoft/qlib / get_datetime_index

Method get_datetime_index

scripts/dump_bin.py:242–243  ·  view source on GitHub ↗
(df: pd.DataFrame, calendar_list: List[pd.Timestamp])

Source from the content-addressed store, hash-verified

240
241 @staticmethod
242 def get_datetime_index(df: pd.DataFrame, calendar_list: List[pd.Timestamp]) -> int:
243 return calendar_list.index(df.index.min())
244
245 def _data_to_bin(self, df: pd.DataFrame, calendar_list: List[pd.Timestamp], features_dir: Path):
246 if df.empty:

Callers 1

_data_to_binMethod · 0.95

Calls 1

indexMethod · 0.45

Tested by

no test coverage detected