data-prep-engine
A lightweight, modular, production-friendly Python library for data ingestion, diagnostics, sanitization, visualization, and end-to-end ML data preparation.
Built to provide a single, unified, reproducible pipeline that works across CSV, JSON, Parquet, images, and more — without depending on massive profiling libraries.
🌟 Key Features
🔌 1. Ingestion Engine (Loader)
Load CSV, JSON, Parquet, Images, and more into a unified StandardTable.
🩺 2. Diagnostics Engine (DataDoctor)
Column-level summaries, warnings, null counts, duplicates, outliers, cardinality & constant-column detection.
🧼 3. Sanitization Engine (The Surgeon)
- Missing value imputation
- Duplicate removal
- IQR-based outlier capping
- Fully extensible sanitization steps
🎨 4. Visualization Engine (The Artist)
Smart single-flag plots (numeric histograms, categorical counts) guided by the diagnostics report.
🚀 5. AutoPrep — End-to-End Unified Pipeline
One line to prepare any dataset:
from data_prep_engine import AutoPrep
prep = AutoPrep.default()
result = prep.run_from_uri("data.csv")
result.cleaned_table.to_pandas().head()
⚙️ Installation
```bash
pip install data-prep-engine
(Coming soon to PyPI — currently install locally using:)
### pip install -e .
🏁 Quickstart
from data_prep_engine import AutoPrep
prep = AutoPrep.default()
# Load, diagnose, clean, visualize — all in one step
result = prep.run_from_uri("data.csv")
print(result.sanitization_logs)
result.cleaned_table.to_pandas().head()
📥 Ingestion Examples
from data_prep_engine.ingestion import Loader
loader = Loader()
table_csv = loader.load("data.csv")
table_json = loader.load("data.json")
table_parquet = loader.load("data.parquet")
table_image = loader.load("image.jpg") # stored as array metadata
All ingestion results are returned as a StandardTable, guaranteeing uniform structure.
🩺 Diagnostics Examples
from data_prep_engine.diagnostics import DataDoctor
doctor = DataDoctor()
report = doctor.diagnose(table)
print(report.summary_table())
print(report.warnings)
Common warnings include: • High missing values • High-cardinality categorical columns • Outlier-heavy numeric columns • Constant features Duplicate rows
🧼 Sanitization Examples
from data_prep_engine.sanitization.pipeline import SanitizationPipeline
from data_prep_engine.sanitization.steps import (
MissingValueHandler,
DuplicateHandler,
OutlierHandler,
)
pipeline = SanitizationPipeline([
MissingValueHandler(),
DuplicateHandler(),
OutlierHandler(),
])
result = pipeline.run(table)
clean_table = result.cleaned_table
print(result.logs)
🎨 Visualization Examples
from data_prep_engine.visualization import Artist
fig = Artist.plot(clean_table, doctor.diagnose(clean_table))
fig.show()
Or save as PNG:
Artist.to_png(fig, "preview.png")
🚀 Full AutoPrep Pipeline
from data_prep_engine import AutoPrep
prep = AutoPrep.default()
result = prep.run_from_uri("data.csv")
print("Warnings before:", result.diagnostics_before.warnings)
print("Warnings after:", result.diagnostics_after.warnings)
fig = prep.plot(result)
fig.show()
###📐 Project Architecture
data_prep_engine/
│
├── ingestion/ # Loaders + format adapters
├── diagnostics/ # DataDoctor + reports
├── sanitization/ # Sanitization steps + pipeline
├── visualization/ # Artist plotting engine
├── core/ # StandardTable + utilities
└── autoprep.py # Full unified pipeline
Each block is independent, testable, and extendable.
🧪 Running Tests
pytest -q
The test suite covers: • Ingestion adapters • Diagnostics summaries • Sanitization steps • Visualization engine • AutoPrep unified pipeline
🤝 Contributing
1. Fork the repo
2. Create a feature branch
3. Add tests for your change
4. Submit a PR
All PRs must pass GitHub Actions (unit tests, linting, and security scanners).
📜 License
MIT License © 2025
Metadata
Release files for data-prep-engine 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| data_prep_engine-0.1.0.tar.gz | 16.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| data_prep_engine-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 35.5 kB
Release files / data_prep_engine-0.1.0.tar.gz
| Download URL | data_prep_engine-0.1.0.tar.gz |
|---|---|
| Size | 16.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3ca3ebcae4b6e053c5f4009e36cb9a1b495762de6150424867ba88ba29ca8c71
|
|
BLAKE2b-256 checksum How to use checksums |
bd07ab9e3171a2cf5c3539413288b8a63d233aa3d70296608916ee6c8c74e574
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.9
|
Release files / data_prep_engine-0.1.0-py3-none-any.whl
| Download URL | data_prep_engine-0.1.0-py3-none-any.whl |
|---|---|
| Size | 18.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9770ad896f4b08fb29aed079d9fbd4635a6ac9160f6395313595fd7f4bad28c6
|
|
BLAKE2b-256 checksum How to use checksums |
b1e721b1baa5fa4255aabb19911039e4f712015b1cdb71d29d7618806ab4ab00
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.9
|
Security for data-prep-engine 0.1.0
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.