Skip to content

Commit 39b30e1

Browse files
author
florian
committed
Revert "Reverted OrdinalEncoder possible bug:"
This reverts commit b95f569.
1 parent 341670f commit 39b30e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

category_encoders/ordinal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ def ordinal_encoding(X_in, mapping=None, cols=None, handle_unknown='value', hand
323323
if handle_missing == 'value' and ~data.index.isnull().any():
324324
data.loc[nan_identity] = -2
325325
elif handle_missing == 'return_nan':
326-
data.loc[nan_identity] = -2
326+
data.loc[nan_identity] = np.nan
327327

328328
mapping_out.append({'col': col, 'mapping': data, 'data_type': X[col].dtype}, )
329329

0 commit comments

Comments
 (0)