Units on a Second Header Row — Not Data (.csv)
The same instrument export with units on a second header row instead of inside the column names, which is how a great many laboratory instruments write CSV. An importer that treats row two as data types every measurement column as text and then quietly refuses to plot anything.
wavelength,absorbance,u_absorbance,temperature
nm,AU,AU,degC
400,0.02003,0.00424,22.40
410,0.02018,0.00424,22.41
420,0.02083,0.00425,22.42
430,0.02338,0.00428,22.43
440,0.03187,0.00438,22.44
450,0.05600,0.00467,22.45
460,0.11417,0.00537,22.46
470,0.23246,0.00679,22.47
480,0.43341,0.00920,22.48
490,0.71380,0.01257,22.49
500,1.02426,0.01629,22.50
510,1.27375,0.01928,22.51
Specifications
- Header Rows
- 2
- Data Rows
- 12
- Columns
- 4
- Row2 Contents
- nm, AU, AU, degC — unit symbols, not measurements
- Naming Convention
- units in a separate row rather than in the column name
- Failure If Ignored
- every numeric column is typed as text
Testing contract
Expected to recover- Scenario
- Import the file treating the first row as names and the second as units, then check the inferred type of the absorbance column.
- Expected result
- Twelve data rows are read, absorbance is inferred as numeric with unit AU, and an importer that reads row two as data reports thirteen rows with a text-typed absorbance column instead.
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
“Units on a Second Header Row — Not Data (.csv)” is a deterministic Novus Examples fixture for Scientific data, CSV parsing, Editor testing, Data import. Citation catalogs (BibTeX, RIS), chemistry structures (MDL Molfile, PDB), and gridded binary data (NetCDF, FITS) — for testing reference managers, molecule viewers, and scientific-data loaders.
Documented properties for this file: 4 columns. 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.
Scientific fixtures are small, valid, and fully synthetic — no real organism, patient, sample, or observation. Point your parser or loader at the file and check it reads the documented records, variables, or headers; binary formats ship a readable twin or metadata listing for comparison.
Code examples
import pandas as pd
df = pd.read_csv("units-in-second-header-row.csv")
print(df.head())
print(df.dtypes)Related files
- csvCensored Values and Detection Limits — Non-Numeric Results (.csv)Nine laboratory results where only four are plain numbers: two are below the detection limit, one is above range, two are missing in different spellings, and one is a legitimate small negative near the blank. Coercing the censored strings to numbers or to NaN both bias the summary, and the file distinguishes every case explicitly.

- csvGUM-Style Uncertainty Budget — Sources Combined in Quadrature (.csv)A five-source uncertainty budget laid out the way the GUM prescribes: each source with its distribution, its divisor, its sensitivity coefficient and its contribution, then the combined and expanded values. Rectangular sources are divided by the square root of three, which is the step budget spreadsheets most often get wrong.

- csvInterlaboratory Comparison — z-Scores and En Numbers (.csv)Six fictional laboratories reporting the same measurand, scored both by z-score against a fixed sigma and by En number against each lab's own claimed uncertainty. The two statistics disagree about which labs are acceptable, which is the point: En rewards an honest uncertainty claim and z does not.

- csvSignificant Figures Lost to Float Parsing (.csv)Eight written measurements where the trailing zeros carry the precision of the measurement, alongside what a float parse leaves behind. Parsing 1.200 to the double 1.2 is not a rounding error, it is the loss of the claim that the value is known to four figures.

- csvTitration Replicates — Mean, SD, SEM and RSD (.csv)Four batches of five replicate titrations with the mean, sample standard deviation, standard error and relative standard deviation computed for each. The standard deviation uses the n-1 denominator, which is stated explicitly because a population-denominator implementation disagrees on every row.

- csvBinary versus Decimal Arithmetic — Where Floats Disagree (.csv)Eight arithmetic expressions where binary floating point and exact decimal disagree, with both answers and the signed error side by side. Adding one cent a hundred times does not give one, and this file says by exactly how much.

Generated by generation/scientific.py. Free for any use, no attribution required — license.