Data & analysisFree→ ChatGPT / Claude
Messy Data Cleaning Script
Generate a reproducible script to clean and validate a messy CSV.
What you get: A documented script with checks, logs and a before/after report.
Write a {{language}} script to clean a messy CSV. Columns and known problems: {{columns_and_issues}}. Target format: {{target_format}}.
Requirements: never overwrite the original file; log every transformation and the number of rows affected; standardize dates, currencies, casing and whitespace; handle duplicates with a clear rule (which record wins and why); validate with explicit checks and write failing rows to a separate rejects file with the reason; produce a short before/after quality report; and make it idempotent so running it twice gives the same result. Add comments explaining each rule so a non-programmer can review the decisions.