CSV Data Quality Report
Operator: Abdulla Al Fahad. How tools are built and checked
Before a CSV export feeds a pivot table, a mail merge or a monthly report, someone usually scrolls through it looking for gaps. Scrolling finds the obvious hole in row 3 and misses the order quantity of 240 sitting among a column of ones and twos, or the single price typed as n/a that will turn a SUM into an error. This report reads the whole file and answers the questions you would otherwise check by eye: how many cells in each column are empty, how many different values there are, what kind of data the column holds, and which numbers sit far away from the rest.
It also checks the file as a whole. Rows that are exact copies of an earlier row are counted and listed with their row numbers, and rows that have more or fewer cells than the header are flagged, because those are the rows where a stray comma has shifted every value one column to the right. Header names that appear twice are reported too, since many tools silently keep only one of them.
Key features
- Empty cells per column as a count and a percentage of data rows, with missing cells at the end of a short row counted as empty
- Distinct value count per column, case-sensitive and after trimming
- Type inference over five types, with a per-type breakdown when a column is mixed
- Minimum and maximum for integer and decimal columns
- Outliers by the 1.5 × IQR rule: the count and the first five values in file order
- Duplicate rows after trimming, with the data row numbers of each repeated group
- Rows with a different number of cells than the header, with their cell counts
- Duplicate and blank header names reported by column position
- The per-column table downloads as a CSV for a data dictionary or a ticket
The five cell types and mixed columns
The input is a comma-separated text file whose first row names the columns. Quoted fields may contain commas and line breaks. Spaces around each cell are trimmed before anything is counted, so " UK" and "UK" are the same value. Lines that are completely blank are skipped and reported as a count; they do not get a row number. Semicolon- and tab-separated files are not split into columns, so re-save those as comma-separated first.
Each non-empty cell is classified as one of five types. Integer means whole numbers such as 42, -7 or 1,250 with commas grouping thousands. Decimal covers 9.99, .5, 1,234.50 and scientific notation like 1e5. Date accepts ISO dates (2026-03-02, optionally with a time such as 2026-03-02T14:30:00Z) and day/month/year or month/day/year with a four-digit year and slash, dot or dash separators; impossible dates such as 2023-02-29 or 31/02/2026 are counted as text. Boolean is true, false, yes or no in any letter case. Everything else is text.
A column whose cells are all one type gets that type. A column of integers with some decimals is reported as decimal, because both are numbers and the minimum, maximum and outliers still make sense. Any other combination is reported as mixed, with the count for each type and a mixed count of the cells that differ from the most common type. The report never picks a winner for a mixed column; that decision is yours.
The download is a CSV with one row per column of your file and these headers: position, column, rows, empty, empty_percent, distinct, type, mixed_count, min, max, outliers and outlier_examples. Outlier examples are joined with a vertical bar so they stay in one cell.
How it works
The first 8 KB of the picked file are scanned for a NUL byte. A UTF-8 text CSV contains none, so a NUL there usually means a workbook or archive saved under a .csv name, and the report stops before parsing. Files that start with a UTF-16 byte-order mark are the exception: UTF-16 text is full of NUL bytes by design, so those files are accepted and decoded as UTF-16. The size limit for profiling is 25 MB, checked from the file size the browser reports, so an oversized export is turned away without loading its contents. Accepted text is split into rows and cells in the page, and nothing is counted until you press Build quality report. A file with more than 100,000 data rows is refused with the number of rows found.
For outliers, the numbers in a column are sorted and the first and third quartiles are found by linear interpolation between neighbouring values, the same inclusive method a spreadsheet's QUARTILE.INC uses. The interquartile range is the third quartile minus the first. Any value more than 1.5 times that range below the first quartile or above the third is an outlier. A column needs at least four numbers before this is attempted; with fewer, the table says so instead of showing a count.
Duplicate detection compares whole rows cell by cell after trimming, so two rows match only when every cell matches. The first time a row appears it is the original; each later copy adds one to the duplicate count. Ragged rows are counted on the raw cell count, before short rows are padded for the column statistics.
Common use cases
- A finance analyst receives a monthly ledger export from a new system and wants to know which columns have gaps before mapping it to the old report layout.
- A marketing team checks a contact list before a campaign: how many emails are empty, whether the same contact appears twice, and whether the country column has stray values.
- A developer writing an import script profiles a sample file to see which columns are reliably numeric and which contain placeholder text that the script must handle.
- A data owner attaches the downloaded column table to a ticket so the team that produces the export can see exactly which fields are incomplete.
How to use this tool
- Pick the export you want to check, or press Use sample data to load a ten-row order list that contains one duplicate row, one short row, one outlier and two mixed columns.
- Check the line and column counts shown under the upload area match what you expect.
- Press Build quality report.
- Read the four summary figures, then any header problems shown in amber.
- Scan the column table: amber empty counts and mixed types are where to look first.
- Read the duplicate and ragged row lists below the table and fix those rows in the source.
- Download the column table if you want to keep it or attach it to a data request.
Example
orders.csv (10 data rows; row 9 is missing its last cell)
order_id,customer,country,order_date,quantity,unit_price,paid
1001,Ava Brooks,UK,2026-03-02,2,14.50,yes
1002,Jonas Weber,DE,2026-03-02,1,14.50,yes
1003,Mila Novak,,2026-03-03,3,9.99,no
1004,Leo Martin,FR,03/04/2026,2,9.99,yes
1005,Sara Lind,SE,2026-03-05,240,9.99,yes
1006,Ava Brooks,UK,2026-03-02,2,14.50,yes
1002,Jonas Weber,DE,2026-03-02,1,14.50,yes
1007,Omar Haddad,AE,2026-03-06,1,n/a,yes
1008,Kim Tran,VN,2026-03-07,4,12.00
1009,Ines Duarte,PT,2026-03-07,2,12.00,pendingColumn table (all seven columns, as downloaded) and whole-file findings
position,column,rows,empty,empty_percent,distinct,type,mixed_count,min,max,outliers,outlier_examples
1,order_id,10,0,0.00,9,integer,0,1001,1009,0,
2,customer,10,0,0.00,8,text,0,,,,
3,country,10,1,10.00,7,text,0,,,,
4,order_date,10,0,0.00,6,date,0,,,,
5,quantity,10,0,0.00,5,integer,0,1,240,1,240
6,unit_price,10,0,0.00,4,"mixed (decimal 9, text 1)",1,,,,
7,paid,10,1,10.00,3,"mixed (boolean 8, text 1)",1,,,,
Duplicate rows: 1 (data rows 2 and 7)
Ragged rows: 1 (data row 9 has 6 cells, header has 7)Tips for best results
- Sort the downloaded table by empty_percent in a spreadsheet to rank columns from most to least complete.
- If a numeric column comes back mixed, the mixed_count tells you how many cells to look for; filter that column for non-numbers in your spreadsheet to find them.
- A distinct count of 1 means the column holds the same value in every non-empty cell, which often marks a column you can drop.
Common pitfalls
Placeholder text is not empty. Cells holding n/a, NULL, none or a single dash are counted as values, so a column full of NULL shows 0% empty. In a numeric column those placeholders show up as a mixed type with a text count, which is often the quickest way to find them.
Identifiers can look like numbers. A column of six-digit customer numbers is reported as integer and gets a minimum, maximum and possibly outliers that mean nothing. Numbers written with a leading zero, such as 00501 or 007, are counted as text, because they are codes and a spreadsheet would strip the zero.
Day and month order is not decided. 03/04/2026 counts as a date whether it means 3 April or 4 March, and a column can contain both conventions without being flagged. Only impossible combinations such as 13/13/2026 are counted as text. Two-digit years and dates written with month names (2 Mar 2026) are counted as text.
Duplicates are exact after trimming. Rows that differ only in letter case, in a trailing zero (14.5 against 14.50) or in a date format are not matched. The duplicate count also covers every column, so two orders that share a customer and amount but have different order IDs are not duplicates.
Outliers are computed per column with no grouping. A quantity of 240 is flagged even if it is normal for one product and rare for the others, and a column with a natural long tail, such as invoice amounts, can show many flagged values that are all valid.
Common errors and how to fix them
- This looks like a binary file, not a text CSV. Choose a CSV file.
- The file contains NUL bytes, which usually means it is an .xlsx, .xls or zip file with a .csv name. Open it in the program that made it and save it as CSV.
- This file has 140,000 data rows. The quality report handles up to 100,000; split the file and profile each part.
- Split the file into parts of 100,000 rows or fewer and profile each one. Duplicate rows that fall in different parts will not be matched against each other, so sort by a key column first if duplicates matter.
- The file has a header row but no data rows to profile.
- Only the first line had content. Check that the export did not stop early, or that the data is not on a second sheet of the original workbook.
- Every column is reported as text, including numbers.
- Look at the cells: currency signs ($14.50), percent signs, spaces inside numbers (1 250) and decimal commas (14,50) all make a value text. Clean those with a find-and-replace and profile again.
Best practices
- Profile the raw export before cleaning it, and keep the downloaded table, so you can show what was wrong and what you changed.
- Fix ragged rows first. A row with an extra cell pushes every later value into the wrong column, which distorts the empty counts, types and outliers of every column to its right.
- Treat an outlier as a question, not an error. Check the 240 against the source order before deleting it; it may be a wholesale order that is entirely correct.
- Compare distinct counts with what you know. An order_id column with fewer distinct values than rows means repeated IDs, even when the rows are not exact duplicates.
Reading the outlier column
In the example, the quantity column holds 2, 1, 3, 2, 240, 2, 1, 1, 4 and 2. Sorted, the first quartile is 1.25 and the third is 2.75, so the interquartile range is 1.5. The fences sit at 1.25 minus 2.25 and 2.75 plus 2.25, which is -1 and 5. Only 240 falls outside them, so the report shows one outlier with 240 as the example.
The rule is a convention, not a test of correctness. It works well for columns where most values cluster, such as quantities, unit prices or durations. For columns that are expected to spread over several orders of magnitude, such as revenue per customer, it flags the large customers you probably care about most. Read the count alongside the minimum and maximum before acting on it.
Why a mixed type is not resolved for you
A column with nine prices and one n/a could be a numeric column with one bad cell, or a text column that happens to contain numbers. Picking decimal would hide the n/a; picking text would hide that the column is almost entirely numeric. The report shows both counts so the fix is clear: replace or blank the one text cell. The same applies to the paid column in the example, where eight yes and no answers sit next to one pending.
Frequently asked questions
How are row numbers counted?
Data row 1 is the first row after the header. Blank lines are skipped and do not get a number. A quoted cell that spans several lines still counts as one row, so the number may differ from the line number shown in a text editor.
Why is a column of whole numbers and decimals not reported as mixed?
Integers and decimals are both numbers, so the column is reported as decimal and still gets a minimum, maximum and outlier check. Mixed is reserved for columns where the values are different kinds of data, such as numbers and text.
Does the report change my file?
No. It only reads the CSV. The download is a separate file describing each column; your original data is not rewritten.