package dataframe

  1. Overview
  2. Docs

CSV Reading and Writing

val read : ?columns:(Base.string * Array_intf.packed) Base.list -> Base.string -> [ `unfiltered ] Df.t Base.Or_error.t

read ?columns filename loads a dataframe from a CSV file. If columns is specified, only the named columns are used in the returned dataframe. If some columns are missing from the CSV file an error is returned.

val read_exn : ?columns:(Base.string * Array_intf.packed) Base.list -> Base.string -> [ `unfiltered ] Df.t

Similar to read_exn but raises exception on errors.

write df filename writes dataframe df in CSV format.

val write_exn : _ Df.t -> Base.string -> Base.unit

Similar to write_exn but raises exception on errors.