Registry / ai-ml / sklearndf

sklearndf

JSON →
library2.4.2pypypi✓ verified 83d ago

Data frame support and feature traceability for scikit-learn. Version 2.4.2 supports Python >=3.9, <4 and integrates with scikit-learn 1.6+. Release cadence is irregular, with recent minor versions every few months.

pip install sklearndf
INSTALL
IMPORT
SIG · SKLEARNDF
S
sklearndf
ai-mlpythonv2.4.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ClassifierDF
from sklearndf import ClassifierDF
from sklearndf.transformation import EstimatorWrapperDF
TransformerDF
from sklearndf import TransformerDF
EstimatorDF
from sklearndf import EstimatorDF

Creates a DecisionTreeClassifier with sklearndf wrapper, fits on iris DataFrame, and prints feature names and predictions.

from sklearn.datasets import load_iris from sklearn.tree import DecisionTreeClassifier from sklearndf.classification import ClassifierDF data = load_iris(as_frame=True) X, y = data.data, data.target clf = ClassifierDF(DecisionTreeClassifier()) clf.fit(X, y) print(clf.feature_names_in_) print(clf.predict(X[:5]))
Debug
Known issues
breakingsklearndf 2.4.0 introduced scikit-learn 1.7 support. Older scikit-learn versions may break with 2.4.0+.
fix
Upgrade scikit-learn to >=1.6 (or 1.7 for full support).
affects: >=2.4.0
gotchaWrapper classes only accept scikit-learn estimators that support DataFrame output. Not all sklearn estimators do; check sklearn documentation.
fix
Use only estimators that are known to return DataFrames (e.g., from sklearn.ensemble, sklearn.linear_model).
affects: all
deprecatedThe pipeline module's `FitDataFrame` and `TransformDataFrame` are deprecated in favor of `EstimatorWrapperDF` and `TransformerWrapperDF`.
fix
Use `sklearndf.transformation.EstimatorWrapperDF` for estimators and `TransformerWrapperDF` for transformers.
affects: >=2.3
gotchaWhen using with sklearn pipelines, use `sklearndf.pipeline.PipelineDF` instead of `sklearn.pipeline.Pipeline` to preserve DataFrame features.
fix
Replace `from sklearn.pipeline import Pipeline` with `from sklearndf.pipeline import PipelineDF`.
affects: all
Upgrade
Version history
2.4.2latest on PyPI · released Sep 3, 2025
Audit
Dependencies
pandasrequiredRequired for DataFrame support
scikit-learnrequiredCore dependency for all estimators
pytoolsrequiredUsed for internal utilities (>=2.1)
Agent activity
10 hits · last 30 days
node
8
OpenAI (training)
1
Resources
sklearndf — pip install sklearndf · libregistry