From a945a9d7b07c68b14b575b8ad2058e53e63f7a6d Mon Sep 17 00:00:00 2001 From: LeoGrin <45738728+LeoGrin@users.noreply.github.com> Date: Thu, 20 Jul 2023 18:48:19 +0200 Subject: [PATCH] Remove double condition (Sorry I think I messed up when applying a suggestion for #623 ) --- skrub/_table_vectorizer.py | 1 - 1 file changed, 1 deletion(-) diff --git a/skrub/_table_vectorizer.py b/skrub/_table_vectorizer.py index aa2e2873d..62ceb6774 100644 --- a/skrub/_table_vectorizer.py +++ b/skrub/_table_vectorizer.py @@ -553,7 +553,6 @@ def _apply_cast(self, X: pd.DataFrame) -> pd.DataFrame: # of missing values object_cols = X.columns[X.dtypes == "object"] for col in object_cols: - if pd.api.types.is_object_dtype(X[col]): X[col] = np.where(X[col].isna(), X[col], X[col].astype(str)) for col, dtype in self.types_.items(): # if categorical, add the new categories to prevent