Module Csv.Rows

Accessing rows (when a header was provided).

val header : in_channel ‑> string list

The header declared for this channel.

val set_header : ?⁠replace:bool ‑> in_channel ‑> string list ‑> unit

set_header ic headers set the new header for all subsequent reads on ic (previously read Row.t values are unaffected). This is useful for example to compose an unusual header after reading several lines of the CSV data.

val next : in_channel ‑> Row.t

See Csv.next. If no header was declared for the channel, this function will work but only access using Row.get will work.

val fold_left : f:('a ‑> Row.t ‑> 'a) ‑> init:'a ‑> in_channel ‑> 'a

See Csv.fold_left.

val fold_right : f:(Row.t ‑> 'a ‑> 'a) ‑> in_channel ‑> 'a ‑> 'a

See Csv.fold_right.

val iter : f:(Row.t ‑> unit) ‑> in_channel ‑> unit

See Csv.iter.

val input_all : in_channel ‑> Row.t list

See Csv.input_all.

val load : ?⁠separator:char ‑> ?⁠strip:bool ‑> ?⁠has_header:bool ‑> ?⁠header:string list ‑> ?⁠backslash_escape:bool ‑> ?⁠excel_tricks:bool ‑> ?⁠fix:bool ‑> string ‑> Row.t list

See Csv.load.

val current : in_channel ‑> Row.t

See Csv.current_record.