{"slug": "csv-rescue-let-local-ai-do-the-tedious-csv-cleanup-without-giving-it-the-keys", "title": "CSV Rescue: Let Local AI Do the Tedious CSV Cleanup — Without Giving It the Keys", "summary": "A developer built CSV Rescue, an open-source, local-first tool that uses a locally hosted open-weight model via Ollama to profile a CSV and suggest cleaning operations, which users approve before deterministic Python code applies them. In testing on a deliberately messy 500-row file, five selected operations produced 475 output rows with 739 cell changes and 61 flagged issues, including 25 removed duplicates, while ambiguous values like 'unknown' or 'TBD' were flagged rather than guessed. The model never generates executable code; its suggestions are validated against a fixed rule set covering whitespace trimming, currency and date normalization, blank-value handling, and deduplication.", "body_md": "*This is a submission for the [Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady](https://dev.to/challenges/hacktoberfest-week3-2026-10-19).*\n\nCSV files are everywhere. Unfortunately, so are the little inconsistencies that make them frustrating to work with: extra whitespace, currency symbols, inconsistent date formats, missing-value placeholders, and duplicate records.\n\nCleaning those problems manually is tedious. Automating the process blindly can be worse.\n\n**CSV Rescue** is a local-first, open-source application that uses AI to identify useful cleaning operations, lets the user approve them, and then applies the selected changes through predictable Python code.\n\nThe idea is simple: **let AI figure out what might need fixing, but don't let it invent the fixes.**\n\nThe workflow has three steps:\n\nThe original file is never overwritten.\n\nFor the demonstration, I generated a deliberately messy 500-row CSV containing inconsistent currency and date formats, extra whitespace, missing-value markers, and duplicate records.\n\nWith five cleaning operations selected, CSV Rescue produced:\n\n| Metric | Result | \n|---|---|\n| Input rows | 500 | \n| Output rows | 475 | \n| Cell changes | 739 | \n| Flagged issues | 61 | \n\nThe application removed 25 duplicate rows while preserving ambiguous values for review.\n\nFor example, when a currency field contains `unknown` or `TBD`, CSV Rescue flags the issue instead of pretending it knows the correct amount.\n\nThe before-and-after preview also includes a change log identifying the affected row, column, operation, original value, and resulting value.\n\n**GitHub:** \n\n[https://github.com/BlacktopLogic/csv-rescue](https://github.com/BlacktopLogic/csv-rescue)\n\nThe repository includes the FastAPI application, deterministic cleaning engine, CSV profiler, sample data, automated tests, setup instructions, and an MIT license.\n\nIt's designed to run locally rather than requiring a hosted application or cloud AI account.\n\nCSV Rescue uses a small, intentionally straightforward stack:\n\nThe model receives a statistical profile of the CSV and recommends operations from a restricted set of supported cleaning rules.\n\nThose operations currently include trimming whitespace, normalizing currency, normalizing dates, normalizing blank values, and removing duplicate rows.\n\nThe model does not get to generate arbitrary Python code for execution. Its suggestions are validated against supported operations, and the user chooses what to apply.\n\nThat separation is intentional. Language models are useful for recognizing patterns and suggesting actions, but data transformation needs to be predictable, inspectable, and repeatable.\n\nLocal inference is central to the design.\n\nCSV files often contain customer information, business records, or operational data that people would rather not send to an external AI service.\n\nBy using Ollama and an open-weight model, CSV Rescue can analyze a file's statistical profile on the user's own computer without requiring a cloud inference API.\n\nThis also makes the project easier to experiment with. The AI layer can evolve independently from the cleaning engine, and the core cleaning functionality doesn't depend on a paid AI subscription.\n\nJust as importantly, open source makes the transformation logic inspectable. Users can see how their data is processed instead of having to trust an opaque AI-generated result.\n\nThe goal isn't to remove people from the process. It's to remove the repetitive work while keeping the important decisions.\n\nInstead of manually inspecting hundreds of rows, searching for formatting inconsistencies, and applying spreadsheet operations one at a time, the user can review a small set of suggested rules and inspect the resulting changes.\n\nDuring testing, CSV Rescue processed a 500-row sample, identified five useful operations, and produced a cleaned file with 739 cell changes.\n\nI also tested the project from a fresh GitHub clone: installing dependencies in a new virtual environment, running all 15 regression tests successfully, launching the application, generating AI recommendations, previewing the results, and downloading the cleaned CSV.\n\n**All 15 automated tests passed.**\n\nThis is an early release, not a replacement for full-featured data preparation software. But it demonstrates a useful principle: AI can take on the tedious pattern-recognition work without being given unrestricted control over the data.\n\n**Slow and steady, with a human still holding the steering wheel.**\n\nBuilt by **Blacktop Logic**.", "url": "https://wpnews.pro/news/csv-rescue-let-local-ai-do-the-tedious-csv-cleanup-without-giving-it-the-keys", "canonical_source": "https://dev.to/travis_calvert/csv-rescue-let-local-ai-do-the-tedious-csv-cleanup-without-giving-it-the-keys-4iig", "published_at": "2026-10-21 22:00:01+00:00", "updated_at": "2026-10-21 22:11:01.553803+00:00", "lang": "en", "topics": ["ai-tools", "ai-products", "artificial-intelligence", "large-language-models", "developer-tools"], "entities": ["CSV Rescue", "Ollama", "BlacktopLogic", "FastAPI", "GitHub"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/csv-rescue-let-local-ai-do-the-tedious-csv-cleanup-without-giving-it-the-keys", "markdown": "https://wpnews.pro/news/csv-rescue-let-local-ai-do-the-tedious-csv-cleanup-without-giving-it-the-keys.md", "text": "https://wpnews.pro/news/csv-rescue-let-local-ai-do-the-tedious-csv-cleanup-without-giving-it-the-keys.txt", "jsonld": "https://wpnews.pro/news/csv-rescue-let-local-ai-do-the-tedious-csv-cleanup-without-giving-it-the-keys.jsonld"}}