ensure backwards compatitibility
This commit is contained in:
		| @@ -1156,7 +1156,8 @@ class FreqaiDataKitchen: | |||||||
|             valid_strs = [f"%-{pair}", f"%{pair}", f"%_{pair}"] |             valid_strs = [f"%-{pair}", f"%{pair}", f"%_{pair}"] | ||||||
|             pair_cols = [col for col in dataframe.columns if |             pair_cols = [col for col in dataframe.columns if | ||||||
|                          any(substr in col for substr in valid_strs)] |                          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) |             corr_dataframes[pair] = dataframe.filter(pair_cols, axis=1) | ||||||
|  |  | ||||||
|         return corr_dataframes |         return corr_dataframes | ||||||
|   | |||||||
| @@ -759,7 +759,7 @@ class IFreqaiModel(ABC): | |||||||
|                                "is included in the column names when you are creating features " |                                "is included in the column names when you are creating features " | ||||||
|                                "in `populate_any_indicators()`.") |                                "in `populate_any_indicators()`.") | ||||||
|             self.get_corr_dataframes = not bool(self.corr_dataframes) |             self.get_corr_dataframes = not bool(self.corr_dataframes) | ||||||
|         else: |         elif self.corr_dataframes: | ||||||
|             dataframe = dk.attach_corr_pair_columns( |             dataframe = dk.attach_corr_pair_columns( | ||||||
|                 dataframe, self.corr_dataframes, dk.pair) |                 dataframe, self.corr_dataframes, dk.pair) | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user