Python CSV cleanup and validation demonstration by Hannah StrangePython CSV cleanup and validation demonstration by Hannah Strange

Python CSV cleanup and validation demonstration

Portfolio project
Hannah Strange
Self-initiated, AI-assisted portfolio demonstration. Synthetic data only. This is not paid client work.
The brief Review a small order CSV without silently deleting questionable records. Preserve source rows, identify exact duplicates and invalid values, and calculate a known-value total from valid, unique rows.
Approach The local Python script uses the standard-library csv module and Decimal arithmetic. It validates the three-column schema, rejects malformed rows, refuses to overwrite the source and adds source-line, line-total and status columns. Missing or invalid values receive a review flag rather than an invented replacement. Quantities must be non-negative whole numbers. Zero is valid.
Input and reviewed result A01: £12.50 × 2 = £25.00. Ready. A02: £8.00 × 3 = £24.00. Ready. A02: identical repeated row. Preserved and excluded from total. A03: £9.00 with missing quantity. Preserved and flagged for review.
Verified command-line result 4 rows preserved. Known-value total: GBP 49.00 Rerun successfully on 15 November 2026.
Limitations The expected fields are order_id, unit_price and quantity. Exact duplicates mean identical original field values. The demo does not normalise spelling variations, infer missing values or integrate with payment systems. Trusted synthetic input only. Production use needs project-specific validation, spreadsheet-formula handling and file-size limits.
Possible client handover A documented script, sample input, reviewed output and usage instructions adapted to an agreed schema. Scope, price and deadline require separate agreement.

0 likes · 0 views · Nov 15, 2026

AI-assisted Python CSV demo: retained rows, review flags and a checked £49 total from synthetic data.

Tags