Skip to main content

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

  1. 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)

Source distribution for straw-machine 0.0.3
File Size Uploaded Provenance Actions
straw_machine-0.0.3.tar.gz 5.8 kB Without provenance Details for straw_machine-0.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for straw-machine 0.0.3
File Interpreter ABI Platform Actions
straw_machine-0.0.3-py3-none-any.whl Python 3 none any Details for straw_machine-0.0.3-py3-none-any.whl

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

Security for straw-machine 0.0.3

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page