Data Science with Python — Medium
Key points
- LabelEncoder encodes target labels as integers
- OrdinalEncoder preserves ordinal order for multiple input feature columns
- LabelEncoder is used for target variables, OrdinalEncoder for feature columns
- OrdinalEncoder is not limited to binary categories like LabelEncoder
Ready to go further?
Related questions
