GitXplorerGitXplorer
r

sklearn-pdtransform

public
12 stars
1 forks
0 issues

Commits

List of commits on branch master.
Verified
c5f046f5104058f91113a4f98440ee16a017ea14

fix: README blog post link

rrubik committed 4 years ago
Unverified
5eb77fb29cc9d455896e43bff23b4b581d97a1d3

chore(release): bump to v0.2

rrubik committed 7 years ago
Unverified
d202ba654d0a65d1cfe156400df877f42c4265f9

update for scikit-learn >= 0.19.0

rrubik committed 7 years ago
Unverified
dcf863d39d91b26150161bb89e91ed31a3bd8cd6

Fix typo in README

rrubik committed 8 years ago
Unverified
7a24241e6f9355be96eee422eaf5b80704dfefb8

Add makefile and update readme

rrubik committed 8 years ago
Unverified
c2d25a287f44b599e063d34edaee470630a1167f

Fix readme

rrubik committed 8 years ago

README

The README file for this repository.

sklearn-pdtransform

Installation:

.. code::

$ pip install pdtransform

A little package with a few transformers to work with Pandas dataframes in the Sklearn pipeline, which I found myself writing quite frequently. Example usage:

.. code:: python

from pdtransform import DFTransform, DFFeatureUnion

pipeline = Pipeline([ ('ordinal_to_nums', DFTransform(_ordinal_to_nums, copy=True)), ('union', DFFeatureUnion([ ('categorical', Pipeline([ ('select', DFTransform(lambda X: X.select_dtypes(include=['object']))), ('fill_na', DFTransform(lambda X: X.fillna('NA'))), ('one_hot', DFTransform(_one_hot_encode)), ])), ('numerical', Pipeline([ ('select', DFTransform(lambda X: X.select_dtypes(exclude=['object']))), ('fill_median', DFTransform(lambda X: X.fillna(X.median()))), ('add_features', DFTransform(_add_features, copy=True)), ('remove_skew', DFTransform(_remove_skew, copy=True)), ('find_outliers', DFTransform(_find_outliers, copy=True)), ('normalize', DFTransform(lambda X: X.div(X.max()))) ])), ])), ])

For more information read this blog post <https://signal-to-noise.xyz/post/sklearn-pipeline/>_.