Clean a messy CSV
Demand the transformation log — otherwise you can't audit what changed.
by @whitney · recommended tool Claude Co-Work · 0 unlocks
0
You'll need
CLAUDE SKILLS
xlsx
EXAMPLES · WHAT THIS PROMPT PRODUCES
Sample output
**Cleaning complete — leads_export_messy.csv → leads_cleaned.csv (3,104 rows)** **Transformation log** 1. **Column names** normalized to snake_case: "First Name "→`first_name`, "E-Mail Addr"→`email`, "Sign Up Date"→`signup_date` (8 columns renamed; trailing spaces stripped). 2. **Dates** — coerced 3 formats (MM/DD/YYYY, DD-Mon-YY, Excel serials) to ISO `YYYY-MM-DD`; 11 unparseable values set to null and flagged. 3. **Types** — `revenue` text→float (stripped "$" and commas); `is_active` "Yes/No/Y/1"→boolean. 4. **Dedupe** — removed 47 exact duplicates and 12 case-insensitive email duplicates (kept earliest signup). 3,163 → 3,104 rows. 5. **Categoricals standardized** — `country`: "USA/U.S./United States"→"United States"; `plan`: "pro/Pro/PRO"→"Pro" (5 variants collapsed to 3 canonical values). 6. **Outliers flagged** — 6 rows where `revenue` > $1M (likely test data) added to `_flag` column rather than dropped. 7. **Whitespace/casing** — trimmed all string fields; lowercased emails. **Summary:** 8 columns normalized, 59 rows removed, 17 values nulled-and-flagged, 6 outliers marked. Cleaned file plus a `_flag` column for manual review are returned — nothing destructive was deleted.
PRICE HISTORY0 cr · current
PROMPT TEMPLATE · v1.0.0
Attached: a messy CSV. Tasks: normalize column names, fix date formats, coerce types, dedupe, flag outliers, standardize categorical values. Return: cleaned file + a log of every transformation applied.
RESULTS · WHAT PEOPLE GOT
0Sign in to show colleagues what this case produced.
No results posted yet. Used this case? Show colleagues what it produced.
DISCUSSION
0 commentsSign in to join the conversation.
No comments yet — be the first.
MORE LIKE THIS