diff --git a/tableshift/core/features.py b/tableshift/core/features.py index 6de7c3e075..e8806cb49d 100644 --- a/tableshift/core/features.py +++ b/tableshift/core/features.py @@ -540,6 +540,11 @@ def get_passthrough_columns(self, data: pd.DataFrame, if self.config.numeric_features == "passthrough": passthrough_columns += get_numeric_columns(data) + elif self.config.numeric_features == "map_values": + # add any unmapped numeric columns + unmapped_numerics = [f for f in get_numeric_columns(data) if self.feature_list[f].value_mapping is None] + passthrough_columns += unmapped_numerics + if self.config.categorical_features == "passthrough": passthrough_columns += get_categorical_columns(data) @@ -550,7 +555,8 @@ def get_passthrough_columns(self, data: pd.DataFrame, passthrough_columns.append(domain_label_colname) if not self.config.map_targets: passthrough_columns.append(target_colname) - return passthrough_columns + + return list(set(passthrough_columns)) def map_names_extended(self, colnames: List[str]) -> List[str]: """Map the original feature names to any extended feature names."""