Catch CSV handoff problems before importing
This post includes a standalone Python script, a small example file, and the expected JSON report. The script identifies malformed row widths, blank required values, and duplicate single or compound keys. It reports logical record numbers so quoted multiline fields do not shift the report.
It runs locally with Python 3.9 or later, requires no third-party packages, and leaves the input unchanged. It reads comma-delimited UTF-8 CSV, including files with a UTF-8 BOM.
Comments