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

Method _read_df

scripts/dump_bin.py:467–475  ·  view source on GitHub ↗
(file_path: Path)

Source from the content-addressed store, hash-verified

465 all_df = []
466
467 def _read_df(file_path: Path):
468 _df = read_as_df(file_path)
469 if self.date_field_name in _df.columns and not np.issubdtype(
470 _df[self.date_field_name].dtype, np.datetime64
471 ):
472 _df[self.date_field_name] = pd.to_datetime(_df[self.date_field_name])
473 if self.symbol_field_name not in _df.columns:
474 _df[self.symbol_field_name] = self.get_symbol_from_file(file_path)
475 return _df
476
477 with tqdm(total=len(self.df_files)) as p_bar:
478 with ThreadPoolExecutor(max_workers=self.works) as executor:

Callers

nothing calls this directly

Calls 2

read_as_dfFunction · 0.85
get_symbol_from_fileMethod · 0.45

Tested by

no test coverage detected