CSV Quality Auditor
Audit a delimited file with the bundled standard-library CLI and interpret its exit status before using the data downstream.
Workflow
Choose the delimiter. Omit
--delimiterfor comma-separated input; otherwise passcomma,semicolon,tab, a literal\t, or one custom character.Run:
python scripts/audit_csv.py INPUT [--delimiter DELIM] [--json]Treat exit
0as clean, exit1as completed with quality issues, and exit2as a usage, read, decoding, or CSV parse failure.Use
--jsonfor automation. Readissuesrather than scraping human output.Report issue codes, logical row numbers, and messages. Do not claim the file is clean when the command failed with exit
2.
Interpretation
row_countcounts data records and excludes the header.column_countis the header width.- Row
1is the header; data records begin at row2. - Empty rows are classified as
empty_rowand are not also reported as width mismatches.
Read references/rules.md when exact rule semantics or JSON behavior matter.