frame/frame
src/frame/frame.tur
defn
frame
(frame [sch : int columns : int] :)
build a frame from a schema and a cons list of column handles.
Parameters
| schema | :int schema handle | |
| columns | cons list of :int column handles |
Returns
:int frame handle, or 0 on shape/arity mismatch.
Example
(let [s (schema (cons (field "x" (type-int32) 0) 0))
c (column-int32 (cons 1 (cons 2 0)) 0 0)
f (frame s (cons c 0))]
(frame-nrows f)) ; => 2
Since: FR0
defn
frame-nrows
(frame-nrows [f : int] :)
number of rows. Since: FR0
defn
frame-ncols
(frame-ncols [f : int] :)
number of columns. Since: FR0
defn
frame-schema
(frame-schema [f : int] :)
schema handle (still owned by the frame). Since: FR0
defn
frame-column-at
(frame-column-at [f : int i : int] :)
column handle at index i (0-based). Returns 0 if out of range.
Since: FR0
defn
frame-column
(frame-column [f : int name : cstr] :)
column handle for a named column. Returns 0 if not found.
Since: FR0
defn
frame-slice
(frame-slice [f : int offset : int length : int] :)
a new frame containing rows [offset, offset+length).
Since: FR0
defn
frame-head
(frame-head [f : int n : int] :)
a new frame containing the first n rows.
Since: FR0
defn
frame-free
(frame-free [f : int] :)
release a frame's schema, columns, and descriptor.
Since: FR0
defn
frame
(frame [a : int b : int] :)
structural equality across schema (names + types) and every cell.
Since: FR2
Internal definitions
__nil__cons__cons-length__cons-nth__shape-ok?__frame-alloc__schema-clone__slice-cols