Skip to content

Commit 287f343

Browse files
authored
Update ordinal.py
1 parent 39b30e1 commit 287f343

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] = np.nan
326+
data.loc[nan_identity] = -2
327327

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

0 commit comments

Comments
 (0)