Data Preprocessing flow tool in python
Project description
ProxiFlow
ProxiFlow is a data preprocessig tool for machine learning that performs data cleaning, normalization, and feature engineering.
The biggest advantage if this library (which is basically a wrapper over polars data frame) is that it is configurable via YAML configuration file which makes it suitable for MLOps pipelines or for building API requests over it.
Documentation
Read the full documentation here.
Usage
To use ProxiFlow, install it via pip:
pip install proxiflow
You can then call it from the command line:
proxiflow --config-file myconfig.yaml --input-file mydata.csv --output-file cleaned_data.csv
Here's an example of a YAML configuration file:
input_format: csv
output_format: csv
data_cleaning: #mandatory
# NOTE: Not handling missing values can cause errors during data normalization
handle_missing_values:
drop: false
mean: true # Only Int and Float columns are handled
# mode: true # Turned off for now.
handle_outliers: true # Only Float columns are handled
remove_duplicates: true
data_normalization: # mandatory
min_max: #mandatory but values are not mandatory. It can be left empty
# Specify columns:
- Age # not mandatory
z_score:
- Price
log:
- Floors
feature_engineering:
one_hot_encoding: # mandatory
- Bedrooms # not mandatory
feature_scaling: # mandatory
degree: 2 # not mandatory. It specifies the polynominal degree
columns: # not mandatory
- Floors # not mandatory
The above configuration specifies that duplicate rows should be removed and missing values should be dropped.
API
ProxiFlow can also be used as a Python library. Here's an example:
import polars as pl
from proxiflow.config import Config
from proxiflow.core import Cleaner
# Load the data
df = pl.read_csv("mydata.csv")
# Load the configuration
config = Config("myconfig.yaml")
# Clean the data
cleaner = Cleaner(config)
cleaned_data = cleaner.clean_data(data)
# Perform data normalization
normalizer = Normalizer(config)
normalized_data = normalizer.normalize(cleaned_data)
# Perform feature engineering
engineer = Engineer(config)
engineered_data = engineer.execute(normalized_data)
# Write the output data
engineered_data.write_csv("cleaned_data.csv")
Log
- [x] Data cleaning
- [x] Data normalization
- [x] Feature engineering
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file proxiflow-0.1.7.tar.gz.
File metadata
- Download URL: proxiflow-0.1.7.tar.gz
- Upload date:
- Size: 11.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.10.10 Darwin/22.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97a74a92b952ba35be907f8661cd6736358570de3e4b92d2fed97b806d5e55d2
|
|
| MD5 |
00c6cd975fb3e1d38667581c429a2b25
|
|
| BLAKE2b-256 |
7de5c0a390f4d27bb3315ddc000bd40e9c0bd2bda68c175e4c8fa6255e26957c
|
File details
Details for the file proxiflow-0.1.7-py3-none-any.whl.
File metadata
- Download URL: proxiflow-0.1.7-py3-none-any.whl
- Upload date:
- Size: 12.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.10.10 Darwin/22.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b4ffb9edcec6a2daff5796f6dda0665eb9f31afbc28d8e03bb0d3d1e6c88416
|
|
| MD5 |
dce379ef3e5bd06e7c22a7e6f85278c2
|
|
| BLAKE2b-256 |
b5cd08166e89aee34074de99260802640a0b21108edf8d0cf9cdb5b447fe95f9
|