A DataFrame workflow accelerator for fast, deterministic data prep and analysis.
Project description
dfxpy: The DataFrame Workflow Accelerator ⚡
dfxpy is a high-performance Python library designed to reduce the entire data preparation and analysis workflow into a few powerful, deterministic operations. It helps data scientists and engineers go from raw, messy datasets to model-ready features in seconds, not hours.
🎯 Why dfxpy?
While pandas is the industry standard for data manipulation, cleaning a dataset for machine learning often requires writing repetitive boilerplate code. dfxpy acts as an accelerator, automating the "grunt work" while providing intelligent diagnostics and insights.
- Fast & Deterministic: Optimized operations without the unpredictability of AI.
- Production-Ready: Type-hinted, modular, and follows PEP8 standards.
- Lightweight: Minimal dependencies—built on top of
pandas,numpy, andscikit-learn. - Self-Contained: Load and analyze data without needing to import multiple libraries.
✨ Key Features
🛠️ Auto-Pilot Cleaning (auto)
One-line pipeline for column normalization (snake_case), duplicate removal, smart type inference (Object → Numeric/Datetime), and missing value imputation.
🔍 Deep Audit (audit)
Intelligent dataset diagnostics that detect:
- ID-like columns (uniqueness checks)
- High cardinality categoricals
- Multicollinearity (correlated features)
- Data skewness and low-variance columns
🚀 ML Preparation (prepare)
Transform your data into X and y instantly. Automatically handles categorical target encoding (LabelEncoding), feature encoding (One-Hot), and optional scaling.
📉 Smart EDA (eda)
Generates structured, human-readable summaries of shapes, nulls, unique counts, and correlation matrices.
🧹 Outlier Management (outliers)
Detect and handle outliers using the IQR (Interquartile Range) method with options to remove or cap.
📊 One-Click Reports (report)
Generate beautiful, standalone HTML EDA reports with distributions and missing value summaries—zero dependencies required.
🔄 Dataset Comparison (compare)
Instantly track changes between two versions of a dataset. Detects shape shifts, column changes, and cell-level value modifications.
⚖️ Smart Balancing (balance)
Handle imbalanced datasets with ease using Oversampling, Undersampling, or synthetic interpolation.
🛡️ Data Contracts (validate)
Enforce rigorous data contracts with schema validation. Ensure your pipeline only processes data that meets your quality standards.
🏗️ Workflow Pipelines (pipeline)
Build, save, and reuse complex cleaning workflows with the new chainable pipeline engine.
💡 ML Model Advisor (suggest)
Get instant recommendations on which ML algorithms (XGBoost, LightGBM, etc.) to use based on your dataset's specific characteristics.
🕵️ Explainable Cleaning (analyze_cleaning)
Understand exactly what happened to your data. Logs every transformation and repair for full transparency.
📦 Installation
Install the latest version via pip:
pip install dfxpy
For detailed usage and parameter definitions, see the Full API Reference.
🚀 Quick Start
Python API
import dfxpy as dfx
# 1. Load data directly
df = dfx.load("raw_data.csv")
# 2. Run auto-clean (names, types, nulls, encoding)
df_clean = dfx.auto(df)
# 3. Get intelligent insights
dfx.audit(df_clean)
# 4. Prepare for Machine Learning
X, y = dfx.prepare(df_clean, target="outcome")
Command Line Interface (CLI)
# Analyze a dataset instantly
dfxpy analyze data.csv
# Prepare data for ML via CLI
dfxpy prepare data.csv --target price --output cleaned_features.csv
🧠 Pandas vs. dfxpy
| Task | Standard Pandas | dfxpy |
|---|---|---|
| Load Data | pd.read_csv("data.csv") |
dfx.load("data.csv") |
| Clean Names | df.columns = [c.lower().replace(' ', '_') for c in df.columns] |
dfx.auto(df) |
| Handle Nulls | df['val'].fillna(df['val'].median()) |
dfx.auto(df) |
| ML Prep | 10+ lines (Split, Encode, Scale) | dfx.prepare(df, target='y') |
| Audit | Manual inspection | dfx.audit(df) |
| HTML Report | 50+ lines (Matplotlib/Jinja) | dfx.report(df) |
| Dataset Diff | df1.compare(df2) (limited) |
dfx.compare(df1, df2) |
| Explainability | Manual logging | dfx.analyze_cleaning(df) |
🤝 Contributing
We welcome contributions! Please see our CONTRIBUTING.md for guidelines on how to submit issues, feature requests, and pull requests.
📄 License
dfxpy is licensed under the MIT License.
Built with ❤️ for the Data Science Community.
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 dfxpy-0.3.5.tar.gz.
File metadata
- Download URL: dfxpy-0.3.5.tar.gz
- Upload date:
- Size: 25.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
24544f39a41101de97ca7547319f98e1482f90555ed6d0d373d1c19d64812ca6
|
|
| MD5 |
58f69801be30307f3456bd87f24f41c8
|
|
| BLAKE2b-256 |
600872a798616818e89e094841eda6575c7a63e8d6c52110cf82a66e6d6dbaf7
|
Provenance
The following attestation bundles were made for dfxpy-0.3.5.tar.gz:
Publisher:
publish.yml on sayantancodex/dfxpy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dfxpy-0.3.5.tar.gz -
Subject digest:
24544f39a41101de97ca7547319f98e1482f90555ed6d0d373d1c19d64812ca6 - Sigstore transparency entry: 1449727283
- Sigstore integration time:
-
Permalink:
sayantancodex/dfxpy@84a411a5bac1ad156cb6e116ce283d0a3667164f -
Branch / Tag:
refs/tags/v0.3.5 - Owner: https://github.com/sayantancodex
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@84a411a5bac1ad156cb6e116ce283d0a3667164f -
Trigger Event:
push
-
Statement type:
File details
Details for the file dfxpy-0.3.5-py3-none-any.whl.
File metadata
- Download URL: dfxpy-0.3.5-py3-none-any.whl
- Upload date:
- Size: 27.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b5fb62b360885ab7f119d1f01b82841f8bd163f782ad5327b443165429b844b3
|
|
| MD5 |
99fb05d51c21a7663f5577da45342003
|
|
| BLAKE2b-256 |
01a231343b1d85dca30a7b31f48d4df86ff9eea72614b029111ba88403e503bb
|
Provenance
The following attestation bundles were made for dfxpy-0.3.5-py3-none-any.whl:
Publisher:
publish.yml on sayantancodex/dfxpy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dfxpy-0.3.5-py3-none-any.whl -
Subject digest:
b5fb62b360885ab7f119d1f01b82841f8bd163f782ad5327b443165429b844b3 - Sigstore transparency entry: 1449727313
- Sigstore integration time:
-
Permalink:
sayantancodex/dfxpy@84a411a5bac1ad156cb6e116ce283d0a3667164f -
Branch / Tag:
refs/tags/v0.3.5 - Owner: https://github.com/sayantancodex
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@84a411a5bac1ad156cb6e116ce283d0a3667164f -
Trigger Event:
push
-
Statement type: