Skip to main content

Module csv

Module csv 

Source
Expand description

CSV/TSV → record text + row-group chunks (EPIC 12.13).

A small RFC-4180-aware parser (quoted fields, escaped "", embedded delimiters/newlines) turns tabular data into header: value records so an LLM sees labeled fields, not bare columns. Chunks are row groups, each prefixed with the header for standalone context. Degrades gracefully: any non-empty input yields at least one non-empty chunk.

Functions§

chunks
Row-group chunks; each chunk repeats the header line for context.
parse
Parse delimited text into rows of fields (RFC-4180 quoting aware).
to_text
Render all data rows as header: value | … records.