From 31206791f43c2455908931508a85396fccffc794 Mon Sep 17 00:00:00 2001 From: Emre Date: Fri, 7 Oct 2022 19:05:49 +0300 Subject: [PATCH] Reset dataframe index after slice --- freqtrade/freqai/data_drawer.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/freqtrade/freqai/data_drawer.py b/freqtrade/freqai/data_drawer.py index cde72bfb5..31c76a68e 100644 --- a/freqtrade/freqai/data_drawer.py +++ b/freqtrade/freqai/data_drawer.py @@ -618,7 +618,8 @@ class FreqaiDataDrawer: ) for tf in self.freqai_info["feature_parameters"].get("include_timeframes"): - base_dataframes[tf] = dk.slice_dataframe(timerange, historic_data[pair][tf]) + base_dataframes[tf] = dk.slice_dataframe( + timerange, historic_data[pair][tf]).reset_index(drop=True) if pairs: for p in pairs: if pair in p: @@ -627,7 +628,7 @@ class FreqaiDataDrawer: corr_dataframes[p] = {} corr_dataframes[p][tf] = dk.slice_dataframe( timerange, historic_data[p][tf] - ) + ).reset_index(drop=True) return corr_dataframes, base_dataframes