Page
Library
Module
Module type
Parameter
Class
Class type
Source
Dataframe.Column('elt, 'storage) t represents a column which elements have typed 'elt and the whole data is stored using type 'storage.
val create : ('a, 'b) Array_intf.t -> 'a -> len:int -> ('a, 'b) tcreate array_intf elt ~len creates a new column of length len using the storage described in Array_intf. All the elements of the column are initially set to elt.
val of_data : ('a, 'b) Array_intf.t -> 'b -> ('a, 'b) tof_data array_intf data returns a new column using data as storage.
val of_array : ('a, 'b) Array_intf.t -> 'a array -> ('a, 'b) tof_array array_intf array creates a new column using data from array. This column is backed by a storage defined in array_intf.
copy ?filter t returns a new column obtained by copying t. If filter is provided only elements that match filter are copied resulting in a column with potentially less elements than t.
select t ~indexes returns a new column using the same storage as t. The elements of this new column are obtained by taking values from t at the indexes specified in indexes. The same index can be specified multiple times in indexes.
val mod_ : ('a, 'b) t -> ('a, 'b) Array_intf.tval get : ('a, _) t -> int -> 'aget t index returns the element of t stored at the specified index. If index is negative or greater than or equal to the number of elements in t an error is raised.
val set : ('a, _) t -> int -> 'a -> unitset t index value sets the element of t at index index to the specified value.
val length : (_, _) t -> intlength t returns the number of elements stored in column t.
val elt_name : (_, _) t -> stringelt_name t returns the kind of elements stored in t as a string.
val get_string : (_, _) t -> int -> stringget_string t index returns a pretty-print of the element at the specified index in t.
val to_string :
?max_rows:int ->
?filter:Dataframe__.Bool_array.t ->
(_, _) t ->
stringto_string t returns a multi-line version of elements stored in t. The number of printed elements can be specified via max_rows and an optional filter can be applied.
val fold : ('a, _) t -> init:'b -> f:('b -> 'a -> 'b) -> 'bval min : ('a, _) t -> 'a optionval max : ('a, _) t -> 'a optionThe packed type is used to abstract the type of elements and the storage used by a column.
val extract : packed -> ('a, 'b) Array_intf.t -> ('a, 'b) t optionval extract_exn : packed -> ('a, 'b) Array_intf.t -> ('a, 'b) tval packed_length : packed -> intval packed_elt_name : packed -> stringval packed_to_string :
?max_rows:int ->
?filter:Dataframe__.Bool_array.t ->
packed ->
stringval packed_get_string : packed -> int -> string