Skip to content

Commit

Permalink
Fix #2948
Browse files Browse the repository at this point in the history
  • Loading branch information
hroff-1902 committed Feb 22, 2020
1 parent 430f53c commit c651e0a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions freqtrade/data/history/jsondatahandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,11 @@ def _ohlcv_load(self, pair: str, timeframe: str,
filename = self._pair_data_filename(self._datadir, pair, timeframe)
if not filename.exists():
return DataFrame(columns=self._columns)
pairdata = read_json(filename, orient='values',
dtype={'open': 'float', 'high': 'float',
'low': 'float', 'close': 'float', 'volume': 'float'})
pairdata = read_json(filename, orient='values')
pairdata.columns = self._columns
pairdata = pairdata.astype(copy=False,
dtype={'open': 'float', 'high': 'float',
'low': 'float', 'close': 'float', 'volume': 'float'})
pairdata['date'] = to_datetime(pairdata['date'],
unit='ms',
utc=True,
Expand Down

0 comments on commit c651e0a

Please sign in to comment.