Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,12 @@ can be easily serialized.

Changelog
---------
2.0.2 (2020-10-01)
******************

* Fix `DataFrameMapper` drop_cols attribute naming consistency with scikit-learn and initialization.


2.0.1 (2020-09-07)
******************

Expand Down Expand Up @@ -585,3 +591,4 @@ Other contributors:
* Vitaley Zaretskey (@vzaretsk)
* Zac Stewart (@zacstewart)
* Parul Singh (@paro1234)
* Vincent Heusinkveld (@VHeusinkveld)
4 changes: 2 additions & 2 deletions sklearn_pandas/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__version__ = '2.0.1'
__version__ = '2.0.2'

from .dataframe_mapper import DataFrameMapper # NOQA
from .features_generator import gen_features # NOQA
from .transformers import NumericalTransformer # NOQA
from .transformers import NumericalTransformer # NOQA
6 changes: 3 additions & 3 deletions sklearn_pandas/dataframe_mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def __init__(self, features, default=False, sparse=False, df_out=False,
self.sparse = sparse
self.df_out = df_out
self.input_df = input_df
self.drop_columns = drop_cols or []
self.drop_cols = [] if drop_cols is None else drop_cols
self.transformed_names_ = []

if (df_out and (sparse or default)):
Expand Down Expand Up @@ -147,7 +147,7 @@ def _unselected_columns(self, X):
X_columns = list(X.columns)
return [column for column in X_columns if
column not in self._selected_columns
and column not in self.drop_columns]
and column not in self.drop_cols]

def __setstate__(self, state):
# compatibility for older versions of sklearn-pandas
Expand All @@ -156,7 +156,7 @@ def __setstate__(self, state):
self.default = state.get('default', False)
self.df_out = state.get('df_out', False)
self.input_df = state.get('input_df', False)
self.drop_columns = state.get('drop_cols', None)
self.drop_cols = state.get('drop_cols', [])
self.built_features = state.get('built_features', self.features)
self.built_default = state.get('built_default', self.default)
self.transformed_names_ = state.get('transformed_names_', [])
Expand Down