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

Method cache_small_data

scripts/data_collector/base.py:175–184  ·  view source on GitHub ↗
(self, symbol, df)

Source from the content-addressed store, hash-verified

173 df.to_csv(instrument_path, index=False)
174
175 def cache_small_data(self, symbol, df):
176 if len(df) < self.check_data_length:
177 logger.warning(f"the number of trading days of {symbol} is less than {self.check_data_length}!")
178 _temp = self.mini_symbol_map.setdefault(symbol, [])
179 _temp.append(df.copy())
180 return self.CACHE_FLAG
181 else:
182 if symbol in self.mini_symbol_map:
183 self.mini_symbol_map.pop(symbol)
184 return self.NORMAL_FLAG
185
186 def _collector(self, instrument_list):
187 error_symbol = []

Callers 1

_simple_collectorMethod · 0.95

Calls 2

copyMethod · 0.80
popMethod · 0.80

Tested by

no test coverage detected