Skip to content

Commit f533a4d

Browse files
prepare release 2.6.1
1 parent f6349a1 commit f533a4d

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
unreleased
22
==========
33

4+
v2.6.1
5+
======
46
* added: ignore option for one-hot-encoding
57
* fixed: external dependency in unit test
68
* fixed: gaps in ordinal encoding if nan values are present
7-
* fixed: sklearn complicance: add `feature_names_in_` attribute
9+
* fixed: sklearn compliance: add `feature_names_in_` attribute
10+
* fixed: sklearn compliance: `get_feature_names_out` function has the correct signature
811
* fixed: add RankHotEncoder in documentation
912
* fixed: return correct mapping in one hot encoder `category_mapping` property (issue #256)
13+
* refactor: quadratic runtime in ordinal encoder (issue #407)
1014

1115
v2.6.0
1216
======

category_encoders/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
from category_encoders.quantile_encoder import QuantileEncoder, SummaryEncoder
2929

3030

31-
__version__ = '2.6.0'
31+
__version__ = '2.6.1'
3232

3333
__author__ = "willmcginnis", "cmougan", "paulwestenthanner"
3434

category_encoders/ordinal.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,8 @@ def ordinal_encoding(X_in, mapping=None, cols=None, handle_unknown='value', hand
229229
if util.is_category(X[col].dtype):
230230
# Avoid using pandas category dtype meta-data if possible, see #235, #238.
231231
if X[col].dtype.ordered:
232-
categories = [c for c in X[col].dtype.categories if c in categories]
232+
category_set = set(categories) # convert to set for faster membership checks c.f. #407
233+
categories = [c for c in X[col].dtype.categories if c in category_set]
233234
if X[col].isna().any():
234235
categories += [np.nan]
235236

0 commit comments

Comments
 (0)