(self, symbol, df)
| 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 = [] |
no test coverage detected