Skip to content

Commit

Permalink
Dropped extra if-else case
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherbunn committed Nov 18, 2020
1 parent 7e82ef9 commit a0e8d3e
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,7 @@ def transform(self, X, y=None):
category_cols = X_null_dropped.select_dtypes(include=['category']).columns
X_t = self._component_obj.transform(X)
if X_null_dropped.empty:
if all_bool:
return pd.DataFrame(X_t, columns=X_null_dropped.columns, dtype=bool)
else:
return pd.DataFrame(X_t, columns=X_null_dropped.columns)
return pd.DataFrame(X_t, columns=X_null_dropped.columns)
X_t = pd.DataFrame(X_t, columns=X_null_dropped.columns)
if len(category_cols) > 0:
X_t[category_cols] = X_t[category_cols].astype('category')
Expand Down

0 comments on commit a0e8d3e

Please sign in to comment.