Skip to content
Novus Examples
csv478 B

Significant 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.

Preview — first 10 linescsv
as_written,as_float,significant_figures,trailing_zeros_meaningful,implied_uncertainty,what_naive_parsing_loses
1.200,1.2,4,true,±0.0005,the two trailing zeros
1.2,1.2,2,false,±0.05,nothing
0.00340,0.0034,3,true,±0.000005,the trailing zero
100,100.0,1 to 3 (ambiguous),unknown,unstated,the ambiguity itself
1.00e2,100.0,3,true,±0.5,the explicit precision
1e2,100.0,1,false,±50,nothing
12.340,12.34,5,true,±0.0005,the trailing zero
0.10,0.1,2,true,±0.005,the trailing zero

Specifications

Rows
8
Columns
6
Issue
trailing zeros carry precision that a float cannot store
Ambiguous Case
100
Recommendation
keep the written form as text alongside the float
Exponential Cases
2

Testing contract

Reference control
Scenario
Parse each as_written string to a float, then attempt to recover the significant_figures column from the float alone.
Expected result
The float values are correct in every row, but the significant figure count cannot be recovered for any row with trailing zeros, which is exactly the four rows flagged trailing_zeros_meaningful.

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

“Significant Figures Lost to Float Parsing (.csv)” is a deterministic Novus Examples fixture for Scientific data, CSV parsing, Editor testing. 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: 8 rows · 6 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("significant-figures.csv")
print(df.head())
print(df.dtypes)

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