Original Python CSV validation demo
I built this small example to show how I handle ambiguous numeric inputs without silently changing data. This uses synthetic data and is not a client project.
What it checks
- IDs stay as text, so 001 retains its leading zeros.
- Zero is valid; an empty amount is missing.
- Text, NaN and decimal-comma strings are flagged as invalid.
- The mean uses only validated amounts and Decimal arithmetic.
- No valid amounts produces None, rather than a misleading zero.
Verified example
001 / 0 -> valid
002 / blank -> missing
003 / ten -> invalid
004 / 10 -> valid
005 / 1,25 -> invalid
006 / NaN -> invalid
Validated mean: 5.
Scope
This demo validates a numeric column. It does not prove a production integration or a completed customer delivery. Duplicate removal, column mapping and acceptance rules are agreed separately for a paid task. Source and run instructions are available on request.