Skip to main content

Custom Pipeline Transformers for Sklearn Pipelines

Project description

Helpful Package For Custom Transformers To Use In Sklearn Pipelines

Installation

pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple scikit-learn-pipeline-utils

Quick Start

from sklearn_pipeline_utils import DFSelector
from sklearn.pipeline import Pipeline
import pandas as pd

df = pd.DataFrame({
    "col1": ["a", "b", "a"],
    "col2": [1, 2, 3]
})

pipeline = Pipeline([
    ("dfselectcol1", DFSelector("col1"))
    ])

print(pipeline.transform(df))
'''
expected result:
  col1
0    a
1    b
2    a
'''

Dataframe Transformers List

  1. DFSelector
  2. DFObjectSelector
  3. DFFeatureUnion
  4. DFImputer
  5. DFImputerMostFrequent
  6. DFOrdinalEncoder
  7. DFStandardScaler

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scikit-learn-pipeline-utils-0.0.2.tar.gz (2.5 kB view hashes)

Uploaded Source

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page