Straw-Machine
A python making machine of sklearn pipeline. This python package tempt to lower the code level in constructing a complicated sklearn pipeline in actual data ETL or ML feature engineering.
Install
pip install straw_machine==0.0.2
Usage
from straw_machine.util import (
generate_estimator,
generate_transformer,
generate_pipeline
)
# udf function: add num to all df col
def add(df, num:int, outcol:str):
df[outcol] = df + num
return df
# estimator:
# send ['a'] from dataframe to estimator inputs
# estimator with function add num(1) to all inputs('a') and get outputs columns (['a', 'a+1'], if origin column is need)
estimator1 =generate_estimator(
name='add1',
func=add,
inputs=['a'],
outputs=['a','a+1'],
kw_args={
'num': 1,
'outcol': 'a+1'
}
)
estimator2 =generate_estimator(
name='add2',
func=add,
inputs=['a'],
outputs=['a+2'],
kw_args={
'num': 2,
'outcol': 'a+2'
}
)
# generate transformer with name specific and estimators list
t1 = generate_transformer(
name='trans1',
estimators=[estimator1, estimator2]
)
pl = generate_pipeline(transformers=[t1])
TODO
- low code pipeline building
- with streamlit / gradio support
Metadata
Release files for straw-machine 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| straw_machine-0.0.3.tar.gz | 5.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| straw_machine-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.3 kB
Release files / straw_machine-0.0.3.tar.gz
| Download URL | straw_machine-0.0.3.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ec42e49a725e1b1c2ca6733a4f4899f47d9dc292257408c1f32b58361f0a9c34
|
|
BLAKE2b-256 checksum How to use checksums |
895d6bac9a99173c5baaf21c4937740f7198427a412d74703f2aa54e70de15da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Release files / straw_machine-0.0.3-py3-none-any.whl
| Download URL | straw_machine-0.0.3-py3-none-any.whl |
|---|---|
| Size | 6.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c9e54778f094cf3d613092df3b85657e893610956ba165f6a992fa62eabe4ff0
|
|
BLAKE2b-256 checksum How to use checksums |
a15f3b18ac8f21b920386a183f2053a8708b0b9991e8182d40388bbbac4ac2a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|