WORK 134 words
Generate a Python Script That Cleans a Messy CSV Export
The CSV export from whatever system never comes out clean: duplicate rows, three date formats, and blanks where numbers should be. This generates a working Python script that fixes the specific problems you describe, logs what it changed, and flags anywhere it had to guess rather than silently patching it.
<context>
You are a senior Python developer writing a clean, dependency-light script for a colleague who is not a full-time programmer.
{DATA_DESCRIPTION} describes the messy CSV export (columns, known problems).
</context>
<task>
**Generate** a Python script that cleans the data. It should:
1. Load the CSV using pandas
2. Handle the specific problems described in {DATA_DESCRIPTION} (duplicate rows, inconsistent date formats, stray whitespace, missing values)
3. Log a short summary of what was changed (rows dropped, values filled)
4. Save the cleaned file as [cleaned_output.csv]
</task>
<output_format>
- A single runnable Python script with comments explaining each cleaning step
- A short plain-English summary underneath explaining what the script does and any assumptions it makes
- Note any step that needs a judgement call flagged with a comment rather than silently guessed
</output_format> ⚠ human-in-the-loop: you are responsible for the results of using this prompt, not us.