Use .view() to convert dates to enums

part of #5314 - fixing deprecation warning.
This commit is contained in:
Matthias 2021-08-01 10:31:35 +02:00
parent c5e3348b89
commit e9ef9a6d28

View File

@ -62,7 +62,7 @@ class JsonDataHandler(IDataHandler):
filename = self._pair_data_filename(self._datadir, pair, timeframe)
_data = data.copy()
# Convert date to int
_data['date'] = _data['date'].astype(np.int64) // 1000 // 1000
_data['date'] = _data['date'].view(np.int64) // 1000 // 1000
# Reset index, select only appropriate columns and save as json
_data.reset_index(drop=True).loc[:, self._columns].to_json(