--- id: sklearn-pandas version: "2.2.0" license: MIT License license_treatment: permissive maintenance: abandoned --- # sklearn-pandas — Pandas integration with sklearn License: permissive · Maintenance: abandoned · Downloads: 205.9K/mo ## What it is and what it does sklearn-pandas provides a DataFrameMapper class that acts as a bridge between pandas DataFrames and scikit-learn's transformers. Instead of manually extracting columns, applying transformations, and reassembling arrays, you define a list of (column_selector, transformer, options) tuples, and the mapper handles the plumbing—selecting columns from your DataFrame, passing them through sklearn transformers, and combining the results back into a feature matrix. The mapper supports flexible column selection (single columns, multiple columns, or callable selectors), custom naming of output features via aliases, prefixes, and suffixes, and automatic tracking of transformed feature names. It integrates directly into sklearn pipelines and works with both fit and transform operations. The four runtime dependencies—scikit-learn, scipy, pandas, and numpy—are standard in the ML stack, so installation is straightforward. Use it for: - Preprocessing mixed-type DataFrames by applying different transformers to different columns before feeding them to a classifier - Building reproducible feature engineering pipelines that map raw DataFrame columns through standardization and encoding in a single object - Tracking which original DataFrame columns produced which transformed features for model interpretability and debugging - Dynamically selecting columns at fit time using callables to handle datasets with unknown or variable column sets ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Bridges pandas DataFrames and scikit-learn by mapping DataFrame columns to transformations and recombining them into features for machine learning pipelines. No. The project is abandoned (last release 2021-05-08, last commit 2023-06-08) with no active maintenance. While the MIT License is permissive and install friction is low, the lack of updates means it may break with newer versions of scikit-learn, pandas, or numpy. For new projects, consider actively maintained alternatives. ## Install pip install sklearn-pandas uv add sklearn-pandas poetry add sklearn-pandas ## Installing sklearn-pandas Before you install: Low install friction with a pure-Python wheel. However, the project is abandoned—last release was 2021-05-08 and last commit 2023-06-08. No active maintenance means bug fixes or compatibility updates are unlikely. License in practice: MIT License permits commercial and private use with minimal restrictions, making it legally safe to adopt for most projects. Quickstart: pip install sklearn-pandas from sklearn_pandas import DataFrameMapper import pandas as pd import sklearn.preprocessing data = pd.DataFrame({'pet': ['cat', 'dog'], 'children': [4., 6]}) mapper = DataFrameMapper([ ('pet', sklearn.preprocessing.LabelBinarizer()), (['children'], sklearn.preprocessing.StandardScaler()) ]) mapper.fit_transform(data) Verify before relying: - Compatibility with current versions of scikit-learn, pandas, numpy, and scipy—last release predates many recent major versions - Whether the package works with modern Python versions (requires_python field is empty in metadata) ## Package facts - License: MIT License (permissive) - Python support: unspecified - Install friction: low - Maintenance: abandoned - Downloads: 205.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags pandas dataframe to sklearn transformer, map dataframe columns to sklearn, feature engineering pandas sklearn, dataframe mapper machine learning, sklearn pandas integration, transform dataframe columns sklearn, pandas feature extraction sklearn, pandas-sklearn-bridge, feature-engineering, abandoned [View on SkillFed](https://skillfed.io/packages/sklearn-pandas) · [View on PyPI](https://pypi.org/project/sklearn-pandas/)