skillfed

feature-engine

Feature engineering and selection package with Scikit-learn's fit transform functionality

feature-engine v1.9.4 331.3K downloads/30d#7,518 on PyPI2,267
Permissive license BSD 3 clause Active released

What it is and what it does

Feature-engine is a Python library that wraps common feature engineering and selection tasks into scikit-learn-compatible transformers. It provides methods for handling missing data, encoding categorical variables, discretising continuous features, capping or removing outliers, transforming and scaling variables, creating new features from existing ones, and selecting the most informative features for modeling. The library depends on numpy, pandas, scikit-learn, scipy, and statsmodels to perform its transformations.

You use it by instantiating a transformer (e.g., RareLabelEncoder, MeanImputer, DropCorrelatedFeatures), calling fit() on training data to learn parameters, and then calling transform() on new data to apply the same transformation. This design integrates naturally into scikit-learn pipelines and cross-validation workflows, making it straightforward to build reproducible feature engineering workflows without writing custom code for each task.

Use it for:

  • Encode rare categorical values into a single 'Rare' category to reduce cardinality before modeling.
  • Impute missing values using mean, median, or arbitrary strategies learned from training data.
  • Remove or cap outliers using statistical methods like Winsorization before training.
  • Create datetime-derived features like day-of-week or cyclical encodings from timestamp columns.
  • Select the most predictive features using correlation, information value, or model-based elimination.
  • Transform skewed variables using log, Box-Cox, or Yeo-Johnson transformations for normality.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Feature-engine provides transformers for engineering, selecting, and preprocessing features in machine learning pipelines, following scikit-learn's fit/transform interface.

Yes. Feature-engine is actively maintained, has no known vulnerabilities, installs with low friction, and provides a comprehensive suite of production-ready transformers that integrate seamlessly with scikit-learn workflows. It is well-suited for anyone building machine learning pipelines who wants to avoid writing repetitive feature engineering code.

Install

feature-engine on PyPI

pip

pip install feature-engine

uv

uv add feature-engine

poetry

poetry add feature-engine

Installing feature-engine

Before you install

Low install friction with a pure Python wheel. Active maintenance with a recent release 168 days ago and 2267 GitHub stars. Supports modern Python versions 3.9 through 3.14.

License in practice

BSD 3-clause permissive license allows commercial and private use with minimal restrictions.

Quickstart

pip install feature_engine

import pandas as pd
from feature_engine.encoding import RareLabelEncoder

data = pd.DataFrame({'var_A': ['A']*10 + ['B']*10 + ['C']*2 + ['D']*1})
encoder = RareLabelEncoder(tol=0.10, n_categories=3)
encoded = encoder.fit_transform(data)

Requires Python 3.9 or later.

Verify before relying

  • Whether all transformer classes are documented with parameter details and use-case guidance.
  • Performance characteristics when applied to large datasets or high-dimensional feature spaces.
  • Compatibility behavior when chaining transformers with custom preprocessing pipelines.

Package facts

License BSD 3 clause (permissive)
Python support supports the current Python release (>=3.9.0)
Install friction low — pure-Python wheel
Runtime dependencies 5 — numpy, pandas, scikit-learn, scipy, statsmodels
Maintenance actively maintained — 168 days since the last release
Last repo commit
First released
Downloads 331,267/month — #7,518 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: feature_engine-1.9.4-py3-none-any.whl

License :: OSI Approved :: BSD LicenseProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9

Tags

feature engineering transformersfeature selection machine learningcategorical encoding imputationvariable transformation scalingscikit-learn compatible feature toolsoutlier handling discretisationtime series feature creation
feature-engineeringscikit-learn-compatibledata-preprocessing

More Artificial Intelligence packages