MCPcopy Create free account
hub / github.com/microsoft/qlib / sync_from_disk

Method sync_from_disk

qlib/data/cache.py:820–826  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

818 self.index_path.chmod(stat.S_IRWXU | stat.S_IRGRP | stat.S_IROTH)
819
820 def sync_from_disk(self):
821 # The file will not be closed directly if we read_hdf from the disk directly
822 with pd.HDFStore(self.index_path, mode="r") as store:
823 if "/{}".format(self.KEY) in store.keys():
824 self._data = pd.read_hdf(store, key=self.KEY)
825 else:
826 self._data = pd.DataFrame()
827
828 def update(self, data, sync=True):
829 self._data = data.astype(np.int32).copy()

Callers 1

get_indexMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected