--- id: feature-engine version: "1.9.4" license: BSD 3 clause license_treatment: permissive maintenance: active --- # feature-engine — Feature engineering and selection package with Scikit-learn's fit transform functionality License: permissive · Maintenance: active · Downloads: 331.3K/mo ## 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 above — 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 pip install feature-engine uv add feature-engine 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_current - Install friction: low - Maintenance: active - Downloads: 331.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags feature engineering transformers, feature selection machine learning, categorical encoding imputation, variable transformation scaling, scikit-learn compatible feature tools, outlier handling discretisation, time series feature creation, feature-engineering, scikit-learn-compatible, data-preprocessing [View on SkillFed](https://skillfed.io/packages/feature-engine) · [View on PyPI](https://pypi.org/project/feature-engine/)