No matching definitions.

frame/reshape

src/frame/reshape.tur
defn

melt

(melt [f :int id-names :int var-name :cstr value-name :cstr] :int)

pivot a wide frame to long format.

f:int source frame
id-namescons list of :cstr id-column names (stay as-is, replicated)
var-name:cstr name of the output column holding original column names
value-name:cstr name of the output column holding cell values

:int frame with (n_orig_rows * n_non_id_cols) rows and (n_id + 2) columns: id columns, then var-name (utf8), then value-name. Non-id columns must share a single type tag; returns 0 otherwise.

Since: FR7

Internal definitions
__rh-nil
__rh-cons
__rh-list-has-cstr?
__rh-list-length
__rh-list-nth-int
__rh-clone-field-at
__rh-non-id-ixs
__rh-id-ixs
__rh-append-cell
__rh-build-id-col
__rh-mod
__rh-mul
__rh-div
__rh-build-var-col
__rh-build-val-col
__rh-common-type
__rh-build-id-fields
__rh-build-id-cols
__rh-list-concat