Skip to main content

get your data cleaned in seconds!

Project description

SpongePy - Data Processing Toolkit 🧽

A versatile Python CLI tool for cleaning, analyzing, and transforming structured data. Designed for data professionals who need quick data wrangling capabilities without spreadsheet software.

   _____                              _____        
  / ____|                            |  __ \       
 | (___  _ __   ___  _ __   __ _  ___| |__) |   _  
  \___ \| '_ \ / _ \| '_ \ / _` |/ _ \  ___/ | | | 
  ____) | |_) | (_) | | | | (_| |  __/ |   | |_| | 
 |_____/| .__/ \___/|_| |_|\__, |\___|_|    \__, | 
        | |                 __/ |            __/ | 
        |_|                |___/            |___/   

Features 🌟

🔄 Data Cleaning

  • Auto-clean phone numbers, IDs, and names
  • Handle missing data with smart strategies:
    • Delete columns with >55% missing values
    • Fill numeric columns with mean/median
    • Multiple threshold configurations
  • Text normalization (case conversion, special characters)

📊 Data Analysis

  • Generate comprehensive reports:
    • Missing value analysis
    • Statistical summaries
    • Column type detection
    • Character distribution in text columns

📁 Multi-Format Support

  • Input: CSV, Excel, JSON, Parquet, SQLite, Stata, Feather, Pickle
  • Output: All input formats + HTML, XML (with consistent schema)

Installation 💻

pip install spongepy

Usage 🛠️

Basic Command Structure

spongepy --file <input> [OPTIONS]

Key Options:

Option Description
-f/--file Input file (required)
--clean Enable auto-cleaning
-c/--config Use custom cleaning config (JSON)
-s/--stats Show summary statistics
-d/--details Show detailed column analysis
-e/--export Export cleaned data (specify filename)

Configuration Example 🧠

Generate config template:

spongepy -f data.csv --details  # Creates config.json
Sample config actions:
exemple config.json : 
{
  "missing-data": [
    ["Age", "4.2%", "mean"],
    ["CreditScore", "12.1%", "median"]
  ],
  "phone-number": "Contact",
  "name": ["FirstName", "LastName"],
  "text-columns": [
    {
      "column": "Notes",
      "special": "!?,.-",
      "numbers": ""  // Remove all digits if exists
    }
  ]
}

Common Workflows 🔄

Quick Clean & Export

spongepy -f dirty_data.xlsx --clean --export clean_data.parquet

Generate Data Health Report

spongepy -f customer_db.sqlite --details > report.txt

Custom Pipeline { }

Generate config:

spongepy -f raw.csv --details

Edit config.json

rules are specified in config.json under 'Guide'

Run targeted clean:

spongepy -f raw.csv --clean -c config.json -e cleaned.csv

Technical Specs ⚙️

Data Cleaning Logic Missing Data % Action 5%< Drop rows 5%-55% Mean/median imputation 80%< Column removal

Supported Text Operations

Case normalization

Special character whitelisting

Digit removal

Custom regex patterns

Support & Contribution 🤝

Found a bug? Want a new feature?

Open an Issue

Contribution Guidelines

License: MIT Version: 1.1.0 Compatibility: Python 3.8+

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

spongepy-0.1.2.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

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

spongepy-0.1.2-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file spongepy-0.1.2.tar.gz.

File metadata

  • Download URL: spongepy-0.1.2.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.11.9 Windows/10

File hashes

Hashes for spongepy-0.1.2.tar.gz
Algorithm Hash digest
SHA256 0d9a5694d8ac647f52bc2ab0f21b631bc3cfaa68995f830e3c4ee749e06be97f
MD5 c93909321f4c4f6905072ce0426bf1bc
BLAKE2b-256 4088cc6d889239769819c354e25801fdc680d777b9fb6858d026d0fb7607a998

See more details on using hashes here.

File details

Details for the file spongepy-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: spongepy-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.11.9 Windows/10

File hashes

Hashes for spongepy-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 306f77e5537e0a6e63fd04c1e7193407bd39287cca3e6dc52eb682cb4baee9f8
MD5 fee5b27a2f54d57d2103587d12d31910
BLAKE2b-256 851383c40b47e03049f3ad2ffd3144ab3868c93c95d332a6fed695379722ee8d

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