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

Method get_source_data

scripts/dump_pit.py:121–126  ·  view source on GitHub ↗
(self, file_path: Path)

Source from the content-addressed store, hash-verified

119 shutil.copytree(str(self.qlib_dir.resolve()), str(target_dir.resolve()))
120
121 def get_source_data(self, file_path: Path) -> pd.DataFrame:
122 df = pd.read_csv(str(file_path.resolve()), low_memory=False)
123 df[self.value_column_name] = df[self.value_column_name].astype("float32")
124 df[self.date_column_name] = df[self.date_column_name].str.replace("-", "").astype("int32")
125 # df.drop_duplicates([self.date_field_name], inplace=True)
126 return df
127
128 def get_symbol_from_file(self, file_path: Path) -> str:
129 return fname_to_code(file_path.name[: -len(self.file_suffix)].strip().lower())

Callers 1

_dump_pitMethod · 0.95

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected