Expand description
CSV adapter for Quarb.
Maps tabular data onto the arbor model the way a DataFrame maps onto a table: one node per record, one property per column.
- The unnamed root has one
rowchild per record, in file order, so/rowiterates the table,/row[5]is the fifth record, and//row @| countis the row count. - Columns are properties, named by the header:
::agereads theagecell. Numeric-looking cells participate in comparisons and arithmetic via the numeric reading (::price * ::qty). - An empty cell is a missing value: the property projects as
null, which numeric aggregates skip and null propagation
respects — pandas’
NaNbehavior without a sentinel. - Rows are leaves; there are no traits and no crosslinks.
:::columnson the root lists the column names;:::n-rowscounts records;:::n-fieldson a row counts its cells;:::delimiterand:::decimalon the root say what was decided.
The first record must be the header. Parsing is strict about ragged rows (a record with the wrong field count is an error).
The delimiter is decided, never sniffed: ?delimiter= on the
mount, else an Excel sep=X first line (a declaration, not a
row), else the extension’s (tab for .tsv, comma otherwise). A
header that never contains the decided delimiter but another
candidate throughout is refused, naming the option. Numbers in
cells read in the canonical form; a source that writes decimal
commas declares it (?decimal=comma), and its cells with a
reading under that convention arrive in canonical form.
Structs§
- CsvAdapter
- A Quarb adapter over a parsed CSV table.
- CsvOptions
- How a delimited file is read: the options a mount carries
(
?delimiter=,?decimal=) and the extension’s default.
Enums§
Functions§
- delimiter_
label - A delimiter by its label.