frame/filter
src/frame/filter.tur
defn
filter-mask
(filter-mask [f :int mask :int] :int)
return a new frame containing rows where mask = 1.
defn
distinct
(distinct [f :int names :int] :int)
return a new frame with duplicate rows removed.
Parameters
| f | :int frame | |
| names | cons list of :cstr column names that define the key. If 0 | |
| (nil), all columns are used. |
Returns
:int new frame containing one row per unique key tuple, in the order the first occurrence appeared after sorting by the key columns.
Since: FR7
defn
sample
(sample [f :int n :int seed :int] :int)
return a new frame with `n` rows chosen uniformly at random
Since: FR7
Internal definitions
__f-nil__f-cons__filter-clone-field-at__column-take-mask-- build a new column containing rows of `col` whose__count-set-bits-- count 1-bits in the first n bits of mask. Since: FR2__take-cols__clone-fields__filter-take-- build a new frame from f by selecting rows in `indices`__list-to-int-array__free-int-array__take-all-cols__f-so-take__distinct-first-rows-- given a frame, key-name list, and the__g-first-row-- accessor for grouped-frame's perm[group_starts[gi]].__cstr-as-int__all-column-names__sample-indices-- produce an int64_t* of `n` distinct random indices in