Fast, simple, chainable data cleaning for pandas DataFrames
Project description
easyclean
Fast, simple, chainable data cleaning for pandas DataFrames — built for data analysts who want clean data in a few lines instead of a wall of boilerplate.
Install
pip install easyclean
Quick start
import pandas as pd
from easyclean import clean
df = pd.read_csv("messy_data.csv")
df_clean = clean(df)
clean() standardizes column names, strips whitespace, drops duplicate rows,
infers proper dtypes, and fills missing values — in one call.
Chainable API (for more control)
from easyclean import Cleaner
cleaner = Cleaner(df)
result = (
cleaner
.standardize_columns()
.strip_strings()
.drop_duplicates()
.handle_missing(strategy="median")
.infer_dtypes()
.remove_outliers()
.df
)
print(cleaner.report())
Example report output:
EasyClean Report
=================
Original shape: (1000, 8)
Final shape: (974, 8)
Missing values: 42 -> 0
Steps applied:
- Standardized column names (3 renamed)
- Stripped whitespace from text columns
- Dropped 12 duplicate row(s)
- Handled missing values (strategy='median'): 42 value(s) filled/removed
- Inferred dtypes (2 column(s) converted)
- Removed 14 outlier row(s) (IQR factor=1.5)
Functions
| Function | What it does |
|---|---|
clean(df) |
One-liner full pipeline |
standardize_column_names(df) |
Lowercase, strip, snake_case columns |
strip_whitespace(df) |
Trim whitespace in text columns |
drop_duplicate_rows(df) |
Remove exact duplicate rows |
handle_missing(df, strategy=...) |
Fill/drop missing values ("auto", "mean", "median", "mode", "drop", "value") |
infer_dtypes(df) |
Convert numeric-looking text columns to numbers |
detect_outliers_iqr(df) |
Boolean mask of IQR-based outliers |
remove_outliers_iqr(df) |
Drop IQR-based outlier rows |
License
MIT
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 easyclean-0.1.0.tar.gz.
File metadata
- Download URL: easyclean-0.1.0.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a86bc03815c9a9e146b29e6d915008eb6093518adf41c10d93f068e946ac8d9b
|
|
| MD5 |
4f2df51ac555adaf27aa554522c52ec8
|
|
| BLAKE2b-256 |
fd89fdf5520e5ec1cc5624bf708824e598dcad7b1e735c7c0ff682d50cf26d78
|
File details
Details for the file easyclean-0.1.0-py3-none-any.whl.
File metadata
- Download URL: easyclean-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c412ecd44e607eadab422063fdf2ee023881d44760ecf695cafa70bb2220929
|
|
| MD5 |
1c5e8155c5670cfaf249f621c84494a4
|
|
| BLAKE2b-256 |
ea58ca6f20b3816d7e85ee32e48ec1ba8b64357e7f2ac2c88c692738fe813d85
|