March Docs

Csv

Csv module: streaming CSV parser.

Two consumption modes: each_row(path, delimiter, mode, callback) -- streaming; guaranteed cleanup read_all(path, delimiter, mode) -- eager; for small files

Modes: :simple -- split on delimiter only; no quoting :rfc4180 -- full RFC 4180: quoted fields, "" escapes, embedded newlines

Convenience: read_csv(path) -- comma-delimited, :rfc4180, eager each_csv_row(path, callback) -- comma-delimited, :rfc4180, streaming

Types

ptypeCsvErrorCsvError = FileError(String) | CsvParseError(String)#
ptypeCsvRowCsvRow = CsvEof | Row(List(String))#

Functions

fneach_roweach_row(path, delimiter, mode, callback)#
fnread_allread_all(path, delimiter, mode)#
fneach_row_with_headereach_row_with_header(path, delimiter, mode, callback)#
fnread_csvread_csv(path)#
fneach_csv_roweach_csv_row(path, callback)#