
Overview
This sample cleans an invented contact export with inconsistent spacing and a repeated record. The goal is to make a small cleanup task easy to inspect while preserving identifiers, multiline notes and meaningful blanks.
My role
I prepared this as a portfolio demonstration with AI assistance across implementation, tests, documentation and visuals. The source package and recorded checks are available on request.
Approach
The CLI trims only explicitly selected columns, then compares complete normalized rows and keeps the first occurrence. It writes a new cleaned file and an audit with the source hash, counts and removed duplicate record numbers. Invalid CSV structure and existing output paths receive a clear error.
Verified result
The example went from eight records to seven: one duplicate was removed and five cells were trimmed. Leading-zero IDs, a multiline note and unselected whitespace stayed intact. The output matched a separately checked fixture, and the original file remained unchanged.
Seven focused tests passed, covering the example, malformed input, output collisions, blank values, UTF-8 and Unicode filenames.
Scope
Designed for small UTF-8 files with a known header. Rules are selected explicitly; the tool does not guess missing values or merge similar records.
0 likes · 0 views · Oct 24, 2026
A small Python tool that applies explicit cleanup rules, preserves the source file and records the changes in an audit.