Skip to main content

dataclean

Auto-detect and fix messy data in one function call.

PyPI version License: MIT Python

Install

pip install dataclean-kuntal

Quick start

import dataclean as dc

clean_df, report = dc.clean("messy_data.csv")
report.summary()

What it fixes

Problem Example Fix
Date format chaos 2024-01-15, 15/01/2024, Jan 15 2024 Normalized to YYYY-MM-DD
Hidden nulls "N/A", "null", "?", "-" Unified to real NaN
Mixed types 25, "thirty", 25.0 Coerced to dominant type
Sneaky duplicates John Smith vs john smith Fuzzy deduplication
Encoding errors Jos\xef Repaired to José
Inconsistent labels "USA", "US", "U.S.A" Merged via fuzzy matching
Column name mess "First Name ", "AGE(Years)" Normalized to snake_case
Outliers 9999999 in salary column Flagged with context

API

import dataclean as dc

# clean any file or DataFrame
clean_df, report = dc.clean("data.csv")
clean_df, report = dc.clean("data.xlsx")
clean_df, report = dc.clean("data.json")
clean_df, report = dc.clean(df)  # existing DataFrame

# use individual fixers
df = dc.fix_columns(df)
df = dc.fix_nulls(df)
df = dc.fix_dates(df)
df = dc.fix_duplicates(df, method="fuzzy")
df = dc.fix_categories(df)
df = dc.flag_outliers(df)

# audit report
report.summary()       # print human-readable summary
report.to_df()         # pandas DataFrame of all changes
report.to_dict()       # list of dicts
report.changes_for("nulls")  # filter by fixer

Options

clean_df, report = dc.clean(
    source="data.csv",
    fix="all",                  # or list: ["columns", "nulls", "dates"]
    output="clean.csv",         # optional save path
    fuzzy_duplicates=True,      # fuzzy deduplication
    outlier_method="iqr",       # "iqr" or "zscore"
    category_threshold=85,      # fuzzy match threshold
    duplicate_threshold=85,     # fuzzy dedup threshold
)

Author

KUNTALinGITHUB — Kuntal Pal, Independent Researcher, Kolkata, India

License

MIT

Metadata

Release files for dataclean-kuntal 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dataclean-kuntal 0.1.2
File Size Uploaded Provenance Actions
dataclean_kuntal-0.1.2.tar.gz 13.0 kB Without provenance Details for dataclean_kuntal-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dataclean-kuntal 0.1.2
File Interpreter ABI Platform Actions
dataclean_kuntal-0.1.2-py3-none-any.whl Python 3 none any Details for dataclean_kuntal-0.1.2-py3-none-any.whl

Total release size: 27.9 kB

Release files / dataclean_kuntal-0.1.2.tar.gz

Download URL dataclean_kuntal-0.1.2.tar.gz
Size 13.0 kB
Tags Source
SHA-256 checksum
How to use checksums
86db0c6109cfd4ed3e82e2cab7d1ff5a201de9f3c20f667447346c2aa768628e
BLAKE2b-256 checksum
How to use checksums
7293561c92eeb989a8624ce74f68ee30104ee132283fe41a58466217afea386c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.3

Release files / dataclean_kuntal-0.1.2-py3-none-any.whl

Download URL dataclean_kuntal-0.1.2-py3-none-any.whl
Size 14.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4597579cd87bd579c820b28d5c5aab3a37282bd0c95ef81e70b3135467a7c4e4
BLAKE2b-256 checksum
How to use checksums
ff3b37818a9a9c00f5646adbd3e4ef6d41f108a83ba7276ccfd323d7596711c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.3

Security for dataclean-kuntal 0.1.2

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.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page