Skip to content
Novus Examples
csv214 B

Sparse Triplets — Both Index Bases Side by Side (.csv)

The twelve stored entries of the sparse matrix with both 1-based and 0-based indices in adjacent columns. It turns the Matrix Market indexing convention from a footnote into something a loader can be diffed against directly.

Preview — first 14 linescsv
row_1_based,column_1_based,value,row_0_based,column_0_based
1,1,4.0,0,0
1,4,-1.5,0,3
2,2,3.25,1,1
2,5,0.75,1,4
3,1,-2.0,2,0
3,3,5.5,2,2
4,6,1.125,3,5
5,2,-0.25,4,1
5,7,2.0,4,6
6,8,-3.75,5,7
7,4,0.5,6,3
8,8,6.0,7,7

Specifications

Rows
12
Columns
5
Shows Both Index Bases
true
Describes
the sparse coordinate .mtx
Value Notation
shortest round-trip repr

Testing contract

Reference control
Scenario
Load the paired .mtx file into your sparse structure and diff the resulting triplets against this table.
Expected result
All twelve entries match on value, and your loader's indices line up with either the 1-based or the 0-based column depending on which convention it uses — never with a mixture.

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

“Sparse Triplets — Both Index Bases Side by Side (.csv)” is a deterministic Novus Examples fixture for Scientific data, Editor testing, Conversion 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: 12 rows · 5 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("sparse-coordinate-real.csv")
print(df.head())
print(df.dtypes)

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