more-transformers
Intro
When building scikit-learn pipelines I often feel I have to do a lot of my data preparation work outside the pipeline. Moreover, many scikit-learn transformers could be more beginer friendly if they returned pandas DataFrames instead of numpy arrays.
With that in mind, this library includes a few additional transformers that are mostly thin wrappers around scikit-learn.
For example:
from more_transformers.preprocessing import StandardScaler
behaves identically to sklearn.preprocessing.StandardScaler but returns a pandas DataFrame with the same column names and index values as the original.
As another example
from more_transformers.decomposition import PCA
is the same as from sklearn.decomposition import PCA but retains the index and uses column names pca_0, pca_1,...,pca_n.
I've also added my own few helpers, mostly under from more_transformers.common. For example
from more_transformers.preprocessing import GetDummies
is a transformer version of pd.get_dummies. One advantage is that if the test data is transformed to have the same columns as pd.get_dummies on the training data.
Also note
from more_transformers.common import ColumnSelector
allows for very flexible selection of columns in your pipeline. For example
ColumnSelector() # Selects all columns
ColumnSelector(['Age','Weight','Height']) # Selects these columns
ColumnSelector('number') # Selects all integer or float columns
ColumnSelector(lambda x: str(x).starts_with('x_')) # Selects columns starting with 'x_'
Metadata
Release files for more-transformers 0.0.11
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| more-transformers-0.0.11.tar.gz | 5.2 kB | Without provenance | Details for more-transformers-0.0.11.tar.gz |
Release files / more-transformers-0.0.11.tar.gz
| Download URL | more-transformers-0.0.11.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
146707db18833d0f191df5329219dd159a9c9e1a3dc829bc726a67aee78c947e
|
|
BLAKE2b-256 checksum How to use checksums |
3bee302a74ebbffd479e341e9a8a6f29b110ce16dcfcd559fc9d7bf22cfaa59c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.6.7
|
Security for more-transformers 0.0.11
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.