Python Daily
2.57K subscribers
1.48K photos
53 videos
2 files
38.9K links
Daily Python News
Question, Tips and Tricks, Best Practices on Python Programming Language
Find more reddit channels over at @r_channels
Download Telegram
πŸβœ‚οΈ CSV Trimming: a one-line to clean up (most) messy CSVs! βœ‚οΈπŸ

Hi r/Python!

Last week, I shared my **ugly-csv-generator** tool with this community, and the response blew me away! πŸ™Œ Thank you so much for the support!

As I promised during the last post, I composed a decent set of heuristics that can often address those hideous CSV monstrosities. So I’m back with a Python package that does just that: **CSV Trimming**.

# πŸ”§ What My Project Does

[**CSV Trimming**](https://github.com/LucaCappelletti94/csv_trimming) is a Python package designed to take messy CSVs β€” the kind you get from scraping websites, legacy systems, or poorly managed data β€” and transform them into clean, well-formatted CSVs with just **one line of code**. No need for complex setups or large language models. It’s simple, straightforward, and generally gets the job done.

# πŸ› οΈ Target Audience

This package is made by a data wrangler for data wranglers. It is not made for people who make terrible CSVs, it is made for those who have to deal with them.

Whether you're dealing with:

* Duplicated schema headers
* Corrupted NaN-like data entries (hello, `#RIF!`, I'm looking at you)
* Or even padding and partial rows...

**CSV Trimming** can handle it all. It's like Marie Kondo for your CSVs β€” if it doesn’t spark joy, it gets trimmed! ✨

# πŸ“¦ Installation

As

/r/Python
https://redd.it/1f2bwx5