Skip to content

Commit

Permalink
Update column selector
Browse files Browse the repository at this point in the history
  • Loading branch information
lixfz committed Feb 15, 2024
1 parent 903da91 commit f529541
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions hypernets/tabular/cuml_ex/_data_cleaner.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def as_local(self):
reduce_mem_usage=self.reduce_mem_usage,
int_convert_to=self.int_convert_to)
copy_attrs_as_local(self, target, 'df_meta_', 'columns_', 'dropped_constant_columns_',
'dropped_idness_columns_', 'dropped_duplicated_columns_')
'dropped_idness_columns_', 'dropped_duplicated_columns_')

return target

Expand All @@ -52,7 +52,7 @@ def _get_duplicated_columns(df):

@staticmethod
def replace_nan_chars(X: cudf.DataFrame, nan_chars):
cat_cols = X.select_dtypes(['object', ])
cat_cols = X.select_dtypes(['object', 'string', ])
if cat_cols.shape[1] > 0:
cat_cols = cat_cols.replace(nan_chars, cupy.nan)
X[cat_cols.columns] = cat_cols
Expand Down
2 changes: 1 addition & 1 deletion hypernets/tabular/dask_ex/_transformers.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ def fit(self, X, y=None):
self.dtypes_ = {c: X[c].dtype for c in X.columns}

if self.columns is None:
columns = X.select_dtypes(include=["category", 'object', 'bool']).columns.to_list()
columns = X.select_dtypes(include=['category', 'object', 'string', 'bool']).columns.to_list()
else:
columns = self.columns

Expand Down

0 comments on commit f529541

Please sign in to comment.