{"id":27399,"library":"sklearndf","title":"sklearndf","description":"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.","status":"active","version":"2.4.2","language":"python","source_language":"en","source_url":"https://github.com/BCG-X-Official/sklearndf","tags":["scikit-learn","dataframe","pandas","wrapper","pipeline","feature-tracking"],"install":[{"cmd":"pip install sklearndf","lang":"bash","label":"pip"},{"cmd":"conda install -c conda-forge -c bcg_gamma sklearndf","lang":"bash","label":"conda"}],"dependencies":[{"reason":"Required for DataFrame support","package":"pandas","optional":false},{"reason":"Core dependency for all estimators","package":"scikit-learn","optional":false},{"reason":"Used for internal utilities (>=2.1)","package":"pytools","optional":false}],"imports":[{"wrong":"from sklearndf.transformation import EstimatorWrapperDF","symbol":"ClassifierDF","correct":"from sklearndf import ClassifierDF"},{"symbol":"TransformerDF","correct":"from sklearndf import TransformerDF"},{"symbol":"EstimatorDF","correct":"from sklearndf import EstimatorDF"}],"quickstart":{"code":"from sklearn.datasets import load_iris\nfrom sklearn.tree import DecisionTreeClassifier\nfrom sklearndf.classification import ClassifierDF\n\ndata = load_iris(as_frame=True)\nX, y = data.data, data.target\n\nclf = ClassifierDF(DecisionTreeClassifier())\nclf.fit(X, y)\nprint(clf.feature_names_in_)\nprint(clf.predict(X[:5]))","lang":"python","description":"Creates a DecisionTreeClassifier with sklearndf wrapper, fits on iris DataFrame, and prints feature names and predictions."},"warnings":[{"fix":"Upgrade scikit-learn to >=1.6 (or 1.7 for full support).","message":"sklearndf 2.4.0 introduced scikit-learn 1.7 support. Older scikit-learn versions may break with 2.4.0+.","severity":"breaking","affected_versions":">=2.4.0"},{"fix":"Use only estimators that are known to return DataFrames (e.g., from sklearn.ensemble, sklearn.linear_model).","message":"Wrapper classes only accept scikit-learn estimators that support DataFrame output. Not all sklearn estimators do; check sklearn documentation.","severity":"gotcha","affected_versions":"all"},{"fix":"Use `sklearndf.transformation.EstimatorWrapperDF` for estimators and `TransformerWrapperDF` for transformers.","message":"The pipeline module's `FitDataFrame` and `TransformDataFrame` are deprecated in favor of `EstimatorWrapperDF` and `TransformerWrapperDF`.","severity":"deprecated","affected_versions":">=2.3"},{"fix":"Replace `from sklearn.pipeline import Pipeline` with `from sklearndf.pipeline import PipelineDF`.","message":"When using with sklearn pipelines, use `sklearndf.pipeline.PipelineDF` instead of `sklearn.pipeline.Pipeline` to preserve DataFrame features.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'1.6':24 '2.4.2':13 '3.9':16 '4':17 'cadenc':26 'data':2 'datafram':39 'everi':33 'featur':6,44 'feature-track':43 'frame':3 'integr':19 'irregular':28 'learn':11,23,38 'minor':31 'month':35 'panda':40 'pipelin':42 'python':15 'recent':30 'releas':25 'scikit':10,22,37 'scikit-learn':9,21,36 'sklearndf':1 'support':4,14 'traceabl':7 'track':45 'version':12,32 'wrapper':41","created_at":"2026-05-01T17:46:04.213549+00:00","updated_at":"2026-05-01T17:46:04.213549+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/BCG-X-Official/sklearndf","docs":"https://bcg-x-official.github.io/sklearndf/","changelog":null,"pypi":"https://pypi.org/project/sklearndf/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["ai-ml","data"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-30","last_verified":"2026-06-30","next_check":"2026-07-30","install_tag":null}}