package dataframe

  1. Overview
  2. Docs

The R module contains an applicative used for maps from rows to values. These can be used with the filter and map functions below. For example, filtering all rows where column "col" has a value 42 and column "col'" has value 3.14 can be done via the following (after opening R.Let_syntax):

  Df.filter df
    [%map_open
      let c1 = Df.R.int "col"
      and c2 = Df.R.int "col'" in
      c1 = 42 && c2 =. 3.14]
|}
type nonrec 'a t
include Base.Applicative.S with type 'a t := 'a t
val return : 'a -> 'a t
val map : 'a t -> f:('a -> 'b) -> 'b t
val both : 'a t -> 'b t -> ('a * 'b) t
val (<*>) : ('a -> 'b) t -> 'a t -> 'b t

same as apply

val (<*) : 'a t -> unit t -> 'a t
val (*>) : unit t -> 'a t -> 'a t
val (>>|) : 'a t -> ('a -> 'b) -> 'b t
val apply : ('a -> 'b) t -> 'a t -> 'b t
val map2 : 'a t -> 'b t -> f:('a -> 'b -> 'c) -> 'c t
val map3 : 'a t -> 'b t -> 'c t -> f:('a -> 'b -> 'c -> 'd) -> 'd t
val all : 'a t list -> 'a list t
val all_unit : unit t list -> unit t
module Applicative_infix : sig ... end
include Base.Applicative.Let_syntax with type 'a t := 'a t
module Open_on_rhs_intf : sig ... end
module Let_syntax : sig ... end
val column : ('a, 'b) Array_intf.t -> Base.string -> 'a t

column array_intf column_name extracts the values from the column named column_name if it matches array_intf.

val int : Base.string -> Base.int t
val float : Base.string -> Base.float t
val string : Base.string -> Base.string t
OCaml

Innovation. Community. Security.