SmartClean-AI
An intelligent Python library for automated data cleaning with profiling, preprocessing, and detailed reporting.
SmartClean-AI simplifies data preparation by identifying and handling common data quality issues, including missing values, duplicate records, and outliers. It generates profiling information before and after cleaning to help users understand changes to their datasets.
- PyPI: https://pypi.org/project/smartclean-ai/
- GitHub: https://github.com/yashtalati10/SmartClean
- Current documented version: 1.1.1
Features
- Automated missing-value detection and handling
- Duplicate row detection and removal
- Outlier detection using the IQR method
- Automatic data profiling
- Before-and-after cleaning reports
- Configurable cleaning pipeline
- Modular and extensible architecture
- Simple Python API
- Open-source and developer-friendly
Installation
Install SmartClean-AI from PyPI:
python -m pip install --upgrade smartclean-ai
To install from the source repository instead:
git clone https://github.com/yashtalati10/SmartClean.git
cd SmartClean
python -m pip install .
Quick Start
1. Prepare your dataset
Place your CSV file in the same directory as your Python script. This example uses participants.csv.
2. Run SmartClean
import pandas as pd
from smartclean import Cleaner
# Load the dataset
df = pd.read_csv("participants.csv")
# Initialize SmartClean
cleaner = Cleaner()
# Run the cleaning pipeline
result = cleaner.clean(df)
# Access the cleaned DataFrame
cleaned_df = result.cleaned_df
# Display the first five rows
print(cleaned_df.head())
# Save the cleaned dataset
cleaned_df.to_csv("cleaned_data.csv", index=False)
print("Cleaned data saved to cleaned_data.csv")
# Compare dataset dimensions
print("Original shape:", df.shape)
print("Cleaned shape:", cleaned_df.shape)
# Display the cleaning report
print(result.report)
The cleaned CSV is saved as cleaned_data.csv in the current working directory.
Example Output
The following is an illustrative example of the kind of messages a cleaning run may produce. Exact values and messages depend on the input dataset and the library version.
========== Missing Value Cleaning ==========
[OK] Column: Age | Missing: 177 | Strategy: mean
[OK] Column: Cabin | Missing: 687 | Strategy: most_frequent
[OK] Column: Embarked | Missing: 2 | Strategy: most_frequent
========== Duplicate Cleaning ==========
[OK] No duplicate rows found.
========== Outlier Cleaning ==========
[OK] Outlier Values Capped: 441
These numbers are illustrative, not guaranteed results for every dataset.
Cleaning Pipeline
Input Dataset
|
v
Data Profiling
|
v
Missing Value Handling
|
v
Duplicate Removal
|
v
Outlier Detection and Handling
|
v
Updated Data Profiling
|
v
Cleaning Report
|
v
Cleaned Dataset
Current Cleaning Capabilities
Missing Values
Depending on the configured cleaning behavior, SmartClean supports:
- Mean imputation
- Median imputation
- Most-frequent-value imputation
- Dropping columns with excessive missing values
Duplicate Records
- Detect duplicate rows
- Remove duplicate records
Outliers
- IQR-based outlier detection
- Outlier capping
- Outlier removal
Accessing Cleaning Results
The Cleaner.clean() method returns a CleaningResult object.
result = cleaner.clean(df)
# Cleaned DataFrame
cleaned_df = result.cleaned_df
# Profile before cleaning
before_profile = result.before_profile
# Profile after cleaning
after_profile = result.after_profile
# Cleaning report
report = result.report
Save the cleaned DataFrame with:
result.cleaned_df.to_csv("cleaned_data.csv", index=False)
Project Structure
The following is the documented project structure. Exact files may vary by repository version.
SmartClean/
├── smartclean/
│ ├── cleaning/
│ ├── config/
│ ├── core/
│ ├── handlers/
│ ├── utils/
│ ├── cleaner.py
│ ├── result.py
│ └── __init__.py
├── example/
│ └── demo.py
├── data/
├── reports/
├── README.md
├── pyproject.toml
└── requirements.txt
Roadmap
Version 1.0 — Core Cleaning Features
- Data profiling
- Missing-value handling
- Duplicate removal
- Outlier detection
- Cleaning reports
Further roadmap items will be documented as they are implemented and verified.
Dependencies
SmartClean-AI declares the following runtime dependencies:
- NumPy
- pandas
- Matplotlib
- scikit-learn
These dependencies are installed automatically when you install the package from PyPI.
Contributing
Contributions, bug reports, and feature suggestions are welcome.
- Repository: https://github.com/yashtalati10/SmartClean
- Issue tracker: https://github.com/yashtalati10/SmartClean/issues
When reporting a problem, include your Python version, SmartClean-AI version, a minimal example, and the full error message.
License
SmartClean-AI is distributed under the MIT License.
Metadata
Release files for smartclean-ai 1.1.2
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 | |
|---|---|---|---|---|
| smartclean_ai-1.1.2.tar.gz | 16.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| smartclean_ai-1.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 36.5 kB
Release files / smartclean_ai-1.1.2.tar.gz
| Download URL | smartclean_ai-1.1.2.tar.gz |
|---|---|
| Size | 16.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
17006156ecfcd2718295d778883d2a2a743d6bae467b1c48db0d8e90ac434b91
|
|
BLAKE2b-256 checksum How to use checksums |
eee714fb5bf773774ecbfc02af867688f59fde69c0591e040f6da0185c56a6ca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / smartclean_ai-1.1.2-py3-none-any.whl
| Download URL | smartclean_ai-1.1.2-py3-none-any.whl |
|---|---|
| Size | 19.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
94eeae5a78d43b37faccccb6c843acc445e17097c2514146d0c4d938a411bbcc
|
|
BLAKE2b-256 checksum How to use checksums |
3e6ec5111c6f4d41278fcfe5d6d8befe93c104f8ce8af956ef7378ba5092f6f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for smartclean-ai 1.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.