Synthetic CSV cleanup: explicit rules and a checked change log by Greg HellermanSynthetic CSV cleanup: explicit rules and a checked change log by Greg Hellerman

Synthetic CSV cleanup: explicit rules and a checked change log

Greg Hellerman

Greg Hellerman

Rule-based CSV cleanup — synthetic demonstration
Fictional data, not client work. AI-assisted preparation with checked arithmetic. This demonstrates explicit transformations, not customer results or production throughput.
Agreed rules: trim surrounding whitespace in ID and label fields; preserve ID text, case and leading zeros; remove only rows identical across all three fields after trimming, keeping the first occurrence; preserve negative quantities. Retain the original and a change log.
Input (quotes show whitespace): row 1: ID " 001 ", label " Widget A ", quantity 10. Row 2: "002", "Widget B", 7. Row 3: "002", "Widget B", 7. Row 4: "003", " Widget C", -2. Row 5: "0007", "Zero Seven ", 1.
Output: 001 / Widget A / 10; 002 / Widget B / 7; 003 / Widget C / -2; 0007 / Zero Seven / 1. Retained original rows: 1, 2, 4 and 5.
Verification: 5 input rows become 4. Row 3 is the only removal and exactly duplicates row 2 after normalization. Whitespace changes affect rows 1, 4 and 5. No quantity is edited. Original total 23 minus duplicate quantity 7 equals output total 16. ID 0007 and quantity -2 remain intact.
Without explicit permission to remove duplicates, the duplicate would be flagged rather than removed. No fuzzy merging, inferred IDs or silent corrections.
Like this project

Posted Sep 20, 2026

Fictional AI-assisted cleanup: 5 rows to 4, totals 23 to 16, with leading zeros and negative quantities preserved. No client work.

Likes

0

Views

6