Skip to main content
ML Quest
Python Idle

ML models speak numbers, not words. When your dataset says "male" or "female", "S" or "C" or "Q", the algorithm has no idea what to do. You need to translate these categories into a numeric language the model understands. But there's more than one way to do it — one-hot encoding creates new binary columns, while label encoding assigns integers. Each approach has trade-offs. In this quest you'll apply both to the Titanic dataset and see the difference.

~20 minscenario891 rows
Loading Python runtime...
Goals: 4 tests
encoded_df should have more columns than the original
feature columns should have no object/string dtypes
should have at least 4 one-hot encoded columns
label_encoded_pclass should exist and contain integers
Python loading...