MCPcopy
hub / github.com/microsoft/qlib / append_index

Method append_index

qlib/data/cache.py:833–839  ·  view source on GitHub ↗
(self, data, to_disk=True)

Source from the content-addressed store, hash-verified

831 self.sync_to_disk()
832
833 def append_index(self, data, to_disk=True):
834 data = data.astype(np.int32).copy()
835 data.sort_index(inplace=True)
836 self._data = pd.concat([self._data, data])
837 if to_disk:
838 with pd.HDFStore(self.index_path) as store:
839 store.append(self.KEY, data, append=True)
840
841 @staticmethod
842 def build_index_from_data(data, start_index=0):

Callers 1

updateMethod · 0.95

Calls 2

copyMethod · 0.80
sort_indexMethod · 0.45

Tested by

no test coverage detected