Reset dataframe index after slice

This commit is contained in:
Emre 2022-10-07 19:05:49 +03:00 committed by Robert Caulk
parent bc09c812a8
commit e337d4b78a
1 changed files with 3 additions and 2 deletions

View File

@ -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