Skip to main content

An advanced and automated data cleaning toolkit for Python.

Project description

AutoCleanSS: Your Automated Data Cleaning Companion

Python Version License

An advanced and automated data cleaning toolkit for Python, designed to streamline your data preprocessing workflow with intelligent imputation, outlier handling, and comprehensive reporting.

✨ Key Features

  • Automated Cleaning Pipeline: Orchestrates a complete data cleaning process from duplicates to outliers.
  • Duplicate Handling: Automatically identifies and removes duplicate rows to ensure data uniqueness.
  • Intelligent Missing Value Imputation: Supports various strategies including mean, median, mode, and knn imputation, tailored for numerical and categorical data. Special handling for datetime missing values.
  • Robust Outlier Treatment: Employs the Interquartile Range (IQR) method to detect and cap outliers in numerical columns, preventing skewness and improving model performance.
  • Automatic Data Type Inference: Dynamically infers and converts appropriate data types (e.g., object to numeric, object to datetime) for better data integrity.
  • Comprehensive HTML Reports: Generates detailed, interactive HTML reports summarizing cleaning actions, before/after statistics, and visual distribution plots for key numerical features.
  • Seamless Pandas Integration: Built to work effortlessly with Pandas DataFrames, making it intuitive for data scientists and analysts.

📦 Installation

To get started with AutoCleanSS, clone the repository and install it using pip:

  1. Clone the repository:

    git clone https://github.com/sudipta9749/autocleanss.git
    cd autocleanss
    
  2. Install dependencies and the package: It's recommended to install in a virtual environment.

    pip install autocleanss
    

🚀 Usage

Using autocleanss is straightforward. Here's a quick example:

import pandas as pd
from autoclean import AutoClean

# 1. Load your messy data into a Pandas DataFrame
#    (Replace with your actual data loading, e.g., pd.read_csv('your_data.csv'))
data = {
    'ID': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
    'Feature_A': [10.1, 11.2, None, 13.4, 14.5, 100.0, 16.7, 17.8, 10.1, 19.9],
    'Feature_B': ['A', 'B', 'A', 'C', 'B', 'D', 'A', 'A', 'A', None],
    'Feature_C': ['01-01-2023', '02-01-2023', '03-01-2023', '04-01-2023', '05-01-2023', None, '07-01-2023', '08-01-2023', '01-01-2023', '09-01-2023'],
    'Feature_D': [5, 6, 5, 7, 8, 9, 10, 11, 5, 12]
}
df = pd.DataFrame(data)

print("--- Original DataFrame ---")
print(df)
print("\n" + "="*40 + "\n")

# 2. Initialize the AutoClean object with your DataFrame
#    You can specify an imputation strategy: 'mean', 'median', 'mode', or 'knn'
cleaner = AutoClean(df, imputation_strategy='knn')

# 3. Run the cleaning process
cleaned_df = cleaner.clean()

print("--- Cleaned DataFrame ---")
print(cleaned_df)
print("\n" + "="*40 + "\n")

# 4. Generate a comprehensive HTML report
#    The report will be saved as 'cleaning_report.html' in your current directory.
cleaner.generate_report(output_path='my_cleaning_report.html')
print("✅ Cleaning report saved to 'my_cleaning_report.html'")

This will produce a my_cleaning_report.html file in your project directory, detailing all the cleaning steps and showing the impact on your data.

You can use

from IPython.display import HTML
HTML(filename='cleaning_report.html')

In your notebook to visualize the report.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

autocleanss-0.1.1.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

autocleanss-0.1.1-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

Details for the file autocleanss-0.1.1.tar.gz.

File metadata

  • Download URL: autocleanss-0.1.1.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for autocleanss-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0e6a9de902c49d953481a72289f60b70e0da2d6741fefdb0500adc7adccd228f
MD5 141181ababee75cdeb85aa7d9c84257f
BLAKE2b-256 f9356f03790d305a516cdba25f213cf6b3856b0d3950d180cfeabc18a6019253

See more details on using hashes here.

File details

Details for the file autocleanss-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: autocleanss-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for autocleanss-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1f0101d3a2153bc0035440f0839ee7d47ce4214adfbbe8ba6ee1e52027a23bdd
MD5 aafa8b46493042b01c0fe5bce3fc7efb
BLAKE2b-256 77e8f237098532f446f080d54cfadf2d04fc48913ad9999b8328ac32d877597b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page