CSV with Duplicate Headers
A small CSV whose header row repeats the column name id: a common importer failure mode.
id,name,id,email
1,Ada,1,ada@example.com
2,Grace,2,grace@example.com
Specifications
- Rows
- 2
- Quirk
- duplicate column name 'id'
- Suite
- parser-edges
Testing contract
Expected to pass- Scenario
- Exercise CSV with Duplicate Headers in its edge cases workflow. A small CSV whose header row repeats the column name id: a common importer failure mode.
- Expected result
- 2 data records using ',' delimiters and UTF-8; header fields are id, name, id, email; data-record widths (columns:count) are {"4":2}. Declared feature checks: quirk=duplicate column name 'id'; suite=parser-edges.
What is a .csv file?
CSV (Comma-Separated Values) is a plain-text tabular format where rows are lines and fields are separated by commas, with quoting rules for values that contain delimiters, quotes, or newlines. It has no formal type system and depends on encoding and dialect conventions. It is the most portable format for tabular data exchange.
How to use this file
Use an example CSV to test parsers against quoting and embedded-delimiter edge cases, header handling, encoding detection, and import pipelines into databases or spreadsheets.
How to use this file for testing
“CSV with Duplicate Headers” is a deterministic Testaroo fixture for CSV parsing, Error handling. Clean and deliberately messy CSVs, quoted commas, embedded newlines, ragged rows, odd delimiters, and encodings.
Documented properties for this file: 2 rows. Compare results against paired or grouped companions on this page when present (clean↔damaged, searchable↔scanned, or format twins) so scores stay reproducible across runs.
Download the file once, keep the path stable in CI or local scripts, and treat the spec table as the contract: dimensions, seeds, field lists, and roles are intentional. Corrupt or invalid samples are labelled as such, expect parsers to fail loudly rather than silently accept them.
Data fixtures document their exact quirks (delimiters, encodings, null handling, schema, and row counts) in the spec table. Point your parser or importer at the file and assert it handles the documented edge cases; clean and deliberately-messy siblings make before/after diffs straightforward.
Feed the file to your parser and assert it handles the documented quirks, quoted delimiters, embedded newlines, ragged rows, or invalid syntax; the valid↔invalid distinction is labelled in the title.
Code examples
import pandas as pd
df = pd.read_csv("duplicate-headers.csv")
print(df.head())
print(df.dtypes)Generated by generation/data_b2_edges.py. Free for any use, no attribution required, license.
Related files
- csvCSV Formula-Injection Safe SampleA sanitization-test CSV with one equals-prefixed cell clearly labelled sample-only. Use it to verify importers neutralize spreadsheet formulas, not an attack list.

- csvCSV with Mixed Null RepresentationsA CSV where missing values are written seven different ways (empty string, NULL, NA, N/A, null, None, and a dash) across text and numeric columns. A fixture for testing null-detection and coercion in CSV importers.

- csvCSV with Mixed Timestamp FormatsA CSV listing timestamps in eleven formats: ISO 8601 with Z and numeric offsets, millisecond precision, naive local, date-only, Unix epoch in seconds and milliseconds, US AM/PM, and RFC 1123. A fixture for testing date parsing and timezone normalisation.

- csvCSV with Mixed-Type ColumnsA CSV whose 'value' column mixes integers, floats, scientific notation, dates, hex, thousands separators, and whitespace, and whose 'flag' column mixes a dozen boolean spellings. A torture test for type inference and schema detection.

- csvAlder Table Bistro: Allergen matrix missing a menu itemAllergen matrix missing a menu item for Alder Table Bistro. Intentionally incomplete. 3 rows where the recipes cost 4 menu items. MENU-04 (Potato gratin) has no row, although it has costed recipe lines in plate-costs.csv and sales in sales-mix-pmix.csv. Its correct row would declare: milk: Cream.

- csvAlder Table Bistro: Allergen menu missing a dish on the menuAllergen menu missing a dish on the menu for Alder Table Bistro. Intentionally incomplete. 3 rows where allergen-menu.csv has 4. MENU-02 Tomato soup is printed on printed-menu.pdf at 11.50 CAD and declares 1 allergen in the costing folder, and it has no row here. The remaining rows are correct.
