Ensure only relevant columns are stored

This commit is contained in:
Matthias 2023-08-18 07:07:10 +02:00
parent 26c89d89e4
commit f69a776305
2 changed files with 2 additions and 2 deletions

View File

@ -92,7 +92,7 @@ class FeatherDataHandler(IDataHandler):
filename = self._pair_trades_filename(self._datadir, pair)
self.create_dir_if_needed(filename)
data.to_feather(filename, compression_level=9, compression='lz4')
data[DEFAULT_TRADES_COLUMNS].to_feather(filename, compression_level=9, compression='lz4')
def trades_append(self, pair: str, data: DataFrame):
"""

View File

@ -109,7 +109,7 @@ class HDF5DataHandler(IDataHandler):
"""
key = self._pair_trades_key(pair)
data.to_hdf(
data[DEFAULT_TRADES_COLUMNS].to_hdf(
self._pair_trades_filename(self._datadir, pair), key,
mode='a', complevel=9, complib='blosc',
format='table', data_columns=['timestamp']