ensure backwards compatitibility

This commit is contained in:
robcaulk 2022-11-02 20:20:35 +01:00
parent 1a38c10fc6
commit ce92731132
2 changed files with 3 additions and 2 deletions

View File

@ -1156,7 +1156,8 @@ class FreqaiDataKitchen:
valid_strs = [f"%-{pair}", f"%{pair}", f"%_{pair}"]
pair_cols = [col for col in dataframe.columns if
any(substr in col for substr in valid_strs)]
pair_cols.insert(0, 'date')
if pair_cols:
pair_cols.insert(0, 'date')
corr_dataframes[pair] = dataframe.filter(pair_cols, axis=1)
return corr_dataframes

View File

@ -759,7 +759,7 @@ class IFreqaiModel(ABC):
"is included in the column names when you are creating features "
"in `populate_any_indicators()`.")
self.get_corr_dataframes = not bool(self.corr_dataframes)
else:
elif self.corr_dataframes:
dataframe = dk.attach_corr_pair_columns(
dataframe, self.corr_dataframes, dk.pair)