Specifying the order of encoding in Ordinal Encoder Specifying the order of encoding in Ordinal Encoder python-3.x python-3.x

Specifying the order of encoding in Ordinal Encoder


I had the same problem. This is bug in scikit-learn, already fixed and added to version 0.20.1, which is still not released. https://github.com/scikit-learn/scikit-learn/issues/12365

I solved it temporarily by copying fixed _encoders.py to my project and using.

from _encoders import OrdinalEncoder