scikit-learn: Imputer, Scaler, One-Hot Encoder

Fill gaps, put numbers on one scale, turn categories into columns

40 min · interactive lesson with runnable code and 5 graded exercises.

What you'll be able to do

  • Impute with the right strategy — and keep “missing” as a signal when it is one
  • Scale numeric features and know which models need it
  • One-hot encode with a fixed vocabulary and handle_unknown="ignore"
  • Order the steps correctly and avoid the get_dummies trap

The full lesson is free with an account.

SimpleImputer

StandardScaler

OneHotEncoder

The get_dummies trap

Order of steps

Pitfalls