ColumnTransformer
ColumnTransformer is a scikit-learn transformer that applies different transformations to specified subsets of input features and combines their outputs.
Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI
ColumnTransformer is a scikit-learn class that applies different transformations to specified subsets of input features and combines their outputs.
- How it is used
- Prepares mixed tabular features for estimators by routing column subsets through separate transformations inside pipelines.
- How deep it goes
- Defines branch tuples, column selection, output options, and pipeline use without descending into implementation internals.
- Examples
- Uses Airbnb listings to one-hot encode categories, process continuous fields, train linear and tree models, and assemble XGBoost features.
- What you can do after
- Apply it via scikit-learn to build reproducible preprocessing-and-model pipelines for mixed tabular data.
Ensemble Methods for Machine Learning
ColumnTransformer is a scikit-learn transformer that applies different transformations to specified subsets of input columns and combines their outputs.
- How it is used
- Coordinates heterogeneous feature preprocessing before model training and evaluation.
- How deep it goes
- Explains column routing, nested pipelines, fitting, transformation, passthrough, and leakage prevention, but not internal implementation.
- Examples
- Demonstrates mixed preprocessing on Australian Credit Approval and Adult income datasets, including feature expansion and classification evaluation.
- What you can do after
- Operate/configure a ColumnTransformer that preprocesses training and test subsets consistently before classification.
Read how Ensemble Methods for Machine Learning explains ColumnTransformer →
What to know first
- binary variableA binary variable is a variable that can take exactly two possible values or categories.
- categorical dataCategorical data consists of values representing membership in discrete categories rather than measured numerical magnitudes.
- missing valueA missing value is an expected data value or observation that is absent, unavailable, unknown, or inapplicable.
Related concepts
- one-hot encodinguses · One-hot encoding represents a categorical value as a binary vector with one active component identifying its category and all other components inactive.
- pipelinepart of · A pipeline is an ordered sequence of connected processing stages in which work or data passes from one stage to the next, often being transformed along the way.
- preprocessingpart of · Preprocessing is the preparation or transformation of data or other inputs into a form suitable for subsequent processing, analysis, or execution.
- standardizationuses · Standardization transforms numerical values by centering and scaling them, commonly to a mean of zero and a standard deviation of one.
- data leakageaddresses · Data leakage is the unintended transfer or use of information outside its intended boundary, compromising confidentiality or the validity of model development or evaluation.
Questions about ColumnTransformer
What is ColumnTransformer?
ColumnTransformer is a scikit-learn transformer that applies different transformations to specified subsets of input features and combines their outputs.
Which Manning books explain ColumnTransformer?
Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI and Ensemble Methods for Machine Learning.
What should I know before learning ColumnTransformer?
Manning books that teach ColumnTransformer usually introduce binary variable, categorical data and missing value first.
What is ColumnTransformer part of?
ColumnTransformer is part of pipeline. A pipeline is an ordered sequence of connected processing stages in which work or data passes from one stage to the next, often being transformed along the way.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

