frame/group
src/frame/group.tur
defn
agg-count
(agg-count :int)
defn
agg-sum
(agg-sum :int)
defn
agg-mean
(agg-mean :int)
defn
agg-min
(agg-min :int)
defn
agg-max
(agg-max :int)
defn
agg-median
(agg-median :int)
defn
agg-std
(agg-std :int)
defn
agg-var
(agg-var :int)
defn
grouped-count
(grouped-count [g :int] :int)
number of distinct groups. Since: FR5
defn
grouped-free
(grouped-free [g :int] :void)
release a grouped-frame handle (does NOT free the source frame).
Since: FR5
defn
group-by
(group-by [f :int names :int] :int)
partition a frame's rows by the named key columns.
Parameters
| f | source frame | |
| names | Vec[cstr] of key column names, built with (vec-of "k1" "k2" ...). | |
| (Was a cons list of cstrs prior to 0.2.0.) |
Returns
an opaque grouped-frame; release with grouped-free.
Since: FR5
defn
agg
(agg [g :int out-names :int in-names :int agg-tags :int] :int)
run aggregations over a grouped frame.
Returns
:int frame whose rows are one per group: [key-cols..., agg-outputs...].
Since: FR5
defn
summarize
(summarize [f :int out-names :int in-names :int agg-tags :int] :int)
whole-frame aggregation; returns a one-row frame.
Internal definitions
__g-nil__g-cons__g-vec-to-cons-- convert a Vec[cstr] (or any Vec[int]) to a cons list.__g-list-length__g-list-nth-int__g-list-nth-cstr__g-build-grouped-- given a frame, the parallel int list of key column__g-names-to-ixs__g-zeros__g-list-to-perm-array__group-by-cons-- internal cons-list group-by, used by intra-spice__g-reduce-int64-- run an aggregation tag over a contiguous range of perm[lo..hi)__g-reduce-float64__g-group-empty?__g-output-type-- determine the output column's type tag for an agg.__g-fill-agg-col-- build a column for one aggregation over all groups.__g-key-col-builder__g-key-rep-rows__g-rep-rows-free__g-build-key-col-- materialize a key column for the result frame by__so-take-bridge__g-source-frame__g-n-keys__g-key-ix-at__g-build-agg-frame__g-build-key-cols__g-build-key-fields__g-build-agg-cols__g-build-agg-fields__g-list-concat__g-make-identity-perm__g-make-starts-array__g-make-trivial-grouped