Skip to content
ML Academy

Introduced on day 9

ColumnTransformer

A scikit-learn component that applies different preprocessing steps to different column groups and concatenates the results, usually placed inside a Pipeline.

In detail

Typical use: impute and scale numeric columns, one-hot encode low-cardinality categories, target-encode high-cardinality ids. Columns not listed are dropped by default (remainder="drop"). Inside a Pipeline, all its steps are fit only on the rows passed to fit.