Module Csv.Rows
Accessing rows (when a header was provided).
val header : in_channel -> string listThe header declared for this channel.
val set_header : ?replace:bool -> in_channel -> string list -> unitset_header ic headersset the new header for all subsequent reads onic(previously readRow.tvalues are unaffected). This is useful for example to compose an unusual header after reading several lines of the CSV data.- parameter replace
When
false(the default), if an entry inheadersis"", the previous name (if any) is kept (see theheaderparameter ofof_in_obj). Whentrue, an entry""means there is no access by name for that column.
val next : in_channel -> Row.tSee
Csv.next. If no header was declared for the channel, this function will work but only access usingRow.getwill work.
val fold_left : f:('a -> Row.t -> 'a) -> init:'a -> in_channel -> 'aSee
Csv.fold_left.
val fold_right : f:(Row.t -> 'a -> 'a) -> in_channel -> 'a -> 'aSee
Csv.fold_right.
val iter : f:(Row.t -> unit) -> in_channel -> unitSee
Csv.iter.
val input_all : in_channel -> Row.t listSee
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 listSee
Csv.loadandCsv.of_in_objfor the optional parameters. Note thathas_headeris false by default to have a uniform interface but you likely want to set it totrueor to explicitly provideheader.
val current : in_channel -> Row.tSee
Csv.current_record.