Tips
The one-minute CSV sanity check
A quick routine to verify any file before you start working.
Dec 19, 20243 min read
Sixty seconds of verification can save hours of debugging. Here's what to check every time.
Check the basics (15 seconds)
Row count, column count, and headers. Do these match your expectations? If not, stop and investigate.
- Count rows and columns
- Verify headers are present and correct
- Check for unexpected empty columns
Scan the first and last rows (15 seconds)
First rows catch import problems. Last rows catch truncation. A quick look at both boundaries reveals common issues.
- First row should be data, not headers repeated
- Last row should be complete
- No partial rows at the end
Quick CTA
Quick verification
Readable CSV makes this routine fast with instant load, sort, and search.
Try itSort one key column (15 seconds)
Pick your most important column and sort it. Scan the extremes. Any surprising values indicate problems.
- Sort by the most important field
- Check minimum and maximum values
- Look for impossible or unexpected values
Search for a known value (15 seconds)
Search for something you know should be there. Finding it confirms the file is aligned correctly.
- Search for a known customer, product, or ID
- Verify it appears in the expected column
- Confirm associated data looks right
Key takeaway
One minute of verification beats hours of debugging corrupt data. Make it automatic.