ML dataset quality scanner, scorer, and auto-fixer
Project description
DataReady ๐งน
ML dataset quality scanner, scorer, and auto-fixer โ in 3 lines of code.
DataReady scans your CSV/DataFrame for 20+ data quality issues, scores it 0โ100, and interactively fixes problems โ before you train your ML model.
import pandas as pd
from dataready import DataReady
df = pd.read_csv("data.csv")
dr = DataReady(df, target_col="label")
dr.scan()
clean_df = dr.fix()
That's it.
Why DataReady?
Most ML bugs come from dirty data โ missing values, ID columns accidentally left in, boolean columns stored as "yes"/"no" strings, outliers that skew your model. DataReady catches all of these before training, not after.
Installation
pip install dataready
Requirements: Python โฅ 3.9, pandas โฅ 1.5, numpy โฅ 1.23
Quick Start
import pandas as pd
from dataready import DataReady
df = pd.read_csv("student_performance.csv")
dr = DataReady(df, target_col="passed")
# 1. Scan โ prints a full quality report in the terminal
dr.scan()
# 2. Fix โ interactive prompt before each fix
clean_df = dr.fix()
# 3. Or auto-approve all fixes
clean_df = dr.fix(auto_approve=True)
# 4. Export a standalone HTML report
dr.export_report("report.html")
What It Detects
| Issue | Severity | Auto-Fix |
|---|---|---|
| Missing values | warning / critical | โ Median / mode imputation, drop if >80% null |
| Duplicate rows | warning / critical | โ Drop duplicates |
| Outliers (IQR) | warning / critical | โ Winsorization |
| High skewness | warning / critical | โ log1p transform |
| ID / key columns | warning | โ Drop column |
| Single-value columns | critical | โ Drop column |
| Near-zero variance | warning | โ Drop column |
| High cardinality | warning | โ Group rare categories as "Other" |
| Numeric stored as string | warning | โ Convert to float64 |
| Boolean stored as string | info | โ Convert to bool |
| Datetime stored as string | info | โ Convert to datetime64 |
| Mixed types in column | warning | โ Cast to string |
| High correlation (multicollinearity) | warning | โ Drop redundant column |
| Leading/trailing whitespace | info | โ Strip whitespace |
| Encoding corruption | warning | โ Remove corrupt characters |
| Class imbalance | warning / critical | โ Manual (SMOTE / class weights) |
| Data leakage | critical | โ Drop leaking column |
Quality Score
Every dataset gets a 0โ100 quality score with a letter grade:
| Score | Grade | Label |
|---|---|---|
| 100 | A+ | Perfect โ ML-ready |
| 90โ99 | A | Excellent |
| 75โ89 | B | Good โ minor issues |
| 60โ74 | C | Fair โ needs attention |
| 40โ59 | D | Poor โ significant cleaning needed |
| < 40 | F | Critical โ major work required |
Terminal Output Example
============================================================
DataReady โ Dataset Quality Report
============================================================
Shape : 500 rows ร 11 columns
Issues : 5 found
Quality Score
86.0 / 100 [โโโโโโโโโโโโโโโโโโโโ] Grade: B
Good โ minor issues to address
[WARNING] โ 2 issue(s)
1. 'parent_education' has 117 missing values (23.4%)
2. 'student_id' is an ID/key column (500 unique, 100% unique)
[INFO] โ 3 issue(s)
1. 'internet_access' looks boolean but stored as string
2. 'extracurricular' looks boolean but stored as string
3. 'passed' looks boolean but stored as string
============================================================
5 of 5 issues are auto-fixable. Call .fix() to apply.
============================================================
HTML Report
dr.export_report("report.html")
Opens in any browser. Includes score, grade, all issues, score breakdown, and a column-by-column detail table.
API Reference
dr = DataReady(df, target_col=None, use_color=True)
dr.scan() # run checks, print report โ returns self
dr.fix(auto_approve=False) # interactive or auto fix โ returns clean DataFrame
dr.export_report("report.html") # save HTML report โ returns path
dr.score() # โ dict {score, grade, label, breakdown}
dr.issues() # โ list of Issue objects
dr.summary() # print one-line summary
target_col
Optional. Enables two extra checks:
- Class imbalance โ is your target unevenly distributed?
- Data leakage โ is any feature suspiciously correlated with the target?
Advanced: scan only specific columns
feature_cols = ["age", "score", "income", "label"]
dr = DataReady(df[feature_cols], target_col="label")
Interactive Fixer
[1/5] WARNING: 'parent_education' has 117 missing values (23.4%)
Apply this fix? [y]es / [n]o / [a]ll / [q]uit :
- y โ apply this fix
- n โ skip this fix
- a โ apply this and all remaining fixes
- q โ quit the fixer
Contributing
Pull requests are welcome! To get started:
git clone https://github.com/yourusername/dataready.git
cd dataready
pip install -e ".[dev]"
pytest tests/
Please open an issue first for major changes.
License
MIT ยฉ 2025 โ free to use, modify, and distribute.
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 dataready-0.2.0.tar.gz.
File metadata
- Download URL: dataready-0.2.0.tar.gz
- Upload date:
- Size: 23.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e64a5a63d7dcf981280fd416f5a0cb5a57d776c231cfc21ee52b7c099f4c99b7
|
|
| MD5 |
3278d39bcd18686641dd092755fb5d76
|
|
| BLAKE2b-256 |
f379721195d399e9cbae5c8f3adf0215b944ef5d4552db08940f53a94d99cb6c
|
File details
Details for the file dataready-0.2.0-py3-none-any.whl.
File metadata
- Download URL: dataready-0.2.0-py3-none-any.whl
- Upload date:
- Size: 22.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
004a7c6dbed7ca7244c20b65f2f04b48a63718d511d526ab6f6663b457178d26
|
|
| MD5 |
a5d2dca48bd2ad969ac19e297255b876
|
|
| BLAKE2b-256 |
f999497c95f9c0f4b319d51643aad2166af47442cea21d54d842ab53db7bd63d
|