Table
Types
Functions
def from_csv (path : String) : Table
def to_csv (table : Table) (path : String) : Unit
def columns (table : Table) : (Array String)
def select (table : Table) (1 columns : (Array ({s : String | hasColumn table s}))) : Table
def filter (table : Table) (predicate : (row : Row) → Bool) : Table
def map_column (table : Table) (column : String | intColumn table column) (f : (a : Int) → Int) : Table
def summary (table : Table) (column : String | intColumn table column) (f : (1 a : (Array Int)) → b) : b
def group_by (table : Table) (column : String | intColumn table column || stringColumn table column) : (Array Table)
def pivot (table : Table) (index : String | intColumn table index || stringColumn table index) (columns : String | stringColumn table columns) (values : String | hasColumn table values) : Table
def melt (table : Table) (1 id_vars : (Array ({s : String | hasColumn table s}))) (1 value_vars : (Array ({s : String | hasColumn table s}))) (var_name : String) (value_name : String) : Table
def nrow (borrow table : Table) : {n : Int | n ≥ 0 && n = rowCount table}
def ncol (borrow table : Table) : Int
def cell (borrow table : Table) (r : Int | 0 ≤ r && r < rowCount table) (col : String | intColumn table col) : Int
def mutate (table : Table) (newcol : String) (f : (row : Row) → Int) : {r : Table | rowCount r = rowCount table && intColumn r newcol}
def sum_col (table : Table) (column : String | intColumn table column) : Int
def mean_col (table : Table) (column : String | intColumn table column) : Int
def max_col (table : Table | rowCount table > 0) (column : String | intColumn table column) : Int
def min_col (table : Table | rowCount table > 0) (column : String | intColumn table column) : Int
def count (borrow table : Table) : {n : Int | n ≥ 0 && n = rowCount table}
def arrange (table : Table) (column : String | intColumn table column) : Table
def head (table : Table) (n : Int) : Table
def cumsum (table : Table) (column : String | intColumn table column) (newcol : String) : {r : Table | rowCount r = rowCount table && intColumn r newcol}
def join (left : Table) (right : Table) (on : String | hasColumn left on && hasColumn right on) : Table
def spread (table : Table) (index : String | intColumn table index || stringColumn table index) (columns : String | stringColumn table columns) (values : String | hasColumn table values) : Table
def gather (table : Table) (1 id_vars : (Array ({s : String | hasColumn table s}))) (1 value_vars : (Array ({s : String | hasColumn table s}))) (var_name : String) (value_name : String) : Table
def dispose (1 table : Table) : Unit
def has_column (borrow table : Table) (name : String) : {b : Bool | b = hasColumn table name}
def is_int_column (borrow table : Table) (name : String) : {b : Bool | b = intColumn table name && (b = false || hasColumn table name)}
def is_string_column (borrow table : Table) (name : String) : {b : Bool | b = stringColumn table name && (b = false || hasColumn table name)}
Uninterpreted
Functions declared as def f ... = uninterpreted: only their signature is known to the verifier; they have no body.
def rowCount : (table : Table) → Int
def hasColumn : (table : Table) → (name : String) → Bool
def intColumn : (table : Table) → (name : String) → Bool
def stringColumn : (table : Table) → (name : String) → Bool