(array-column->columns ds src-column)
(array-column->columns ds src-column opts)
Converts a column of type java array into several columns, one for each element of the array of all rows. The source column is dropped afterwards. The function assumes that arrays in all rows have same type and length and are numeric.
ds
Datset to operate on.
src-column
The (array) column to convert
opts
can contain:
prefix
newly created column will get prefix before column number
Converts a column of type java array into several columns, one for each element of the array of all rows. The source column is dropped afterwards. The function assumes that arrays in all rows have same type and length and are numeric. `ds` Datset to operate on. `src-column` The (array) column to convert `opts` can contain: `prefix` newly created column will get prefix before column number
(columns->array-column ds column-selector new-column)
Converts several columns to a single column of type array. The src columns are dropped afterwards.
ds
Dataset to operate on.
column-selector
anything supported by [[select-columns]]
new-column
new column to create
Converts several columns to a single column of type array. The src columns are dropped afterwards. `ds` Dataset to operate on. `column-selector` anything supported by [[select-columns]] `new-column` new column to create
(join-columns ds target-column columns-selector)
(join-columns ds
target-column
columns-selector
{:keys [separator missing-subst drop-columns? result-type
parallel?]
:or {separator "-" drop-columns? true result-type :string}
:as _conf})
Join clumns of dataset. Accepts:
dataset
column selector (as in select-columns)
options
:separator
(default "-")
:drop-columns?
- whether to drop source columns or not (default true)
:result-type
:map
- packs data into map
:seq
- packs data into sequence
:string
- join strings with separator (default)
or custom function which gets row as a vector
:missing-subst
- substitution for missing value
Join clumns of dataset. Accepts: dataset column selector (as in select-columns) options `:separator` (default "-") `:drop-columns?` - whether to drop source columns or not (default true) `:result-type` `:map` - packs data into map `:seq` - packs data into sequence `:string` - join strings with separator (default) or custom function which gets row as a vector `:missing-subst` - substitution for missing value
(separate-column ds column)
(separate-column ds column separator)
(separate-column ds column target-columns separator)
(separate-column ds
column
target-columns
separator
{:keys [missing-subst drop-column? parallel?]
:or {missing-subst ""}
:as _conf})
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close