Liking cljdoc? Tell your friends :D

tablecloth.api.columns


->arrayclj

(->array ds colname)
(->array ds colname datatype)

Convert numerical column(s) to java array

Convert numerical column(s) to java array
raw docstring

add-columnclj

(add-column ds column-name column)
(add-column ds column-name column size-strategy)

Add or update (modify) column under column-name.

column can be sequence of values or generator function (which gets ds as input).

  • ds - a dataset
  • column-name - if it's existing column name, column will be replaced
  • column - can be column (from other dataset), sequence, single value or function. Too big columns are always trimmed. Too small are cycled or extended with missing values (according to size-strategy argument)
  • size-strategy (optional) - when new column is shorter than dataset row count, following strategies are applied:
    • :cycle - repeat data
    • :na - append missing values
    • :strict - (default) throws an exception when sizes mismatch
Add or update (modify) column under `column-name`.

`column` can be sequence of values or generator function (which gets `ds` as input).

* `ds` - a dataset
* `column-name` - if it's existing column name, column will be replaced
* `column` - can be column (from other dataset), sequence, single value or function. Too big columns are always trimmed. Too small are cycled or extended with missing values (according to `size-strategy` argument)
* `size-strategy` (optional) - when new column is shorter than dataset row count, following strategies are applied:
  - `:cycle` - repeat data
  - `:na` - append missing values
  - `:strict` - (default) throws an exception when sizes mismatch
raw docstring

add-columnsclj

(add-columns ds columns-map)
(add-columns ds columns-map size-strategy)

Add or updade (modify) columns defined in columns-map (mapping: name -> column)

Add or updade (modify) columns defined in `columns-map` (mapping: name -> column) 
raw docstring

add-or-replace-columncljdeprecated

(add-or-replace-column ds column-name column)
(add-or-replace-column ds column-name column size-strategy)

add-or-replace-columnscljdeprecated

(add-or-replace-columns ds columns-map)
(add-or-replace-columns ds columns-map size-strategy)

convert-typesclj

(convert-types ds coltype-map-or-columns-selector)
(convert-types ds columns-selector new-types)

Convert type of the column to the other type.

Convert type of the column to the other type.
raw docstring

drop-columnsclj

(drop-columns ds)
(drop-columns ds columns-selector)
(drop-columns ds columns-selector meta-field)

Drop columns by (returns dataset):

  • name
  • sequence of names
  • map of names with new names (rename)
  • function which filter names (via column metadata)
Drop columns by (returns dataset):

- name
- sequence of names
- map of names with new names (rename)
- function which filter names (via column metadata)
raw docstring

map-columnsclj

(map-columns ds column-name map-fn)
(map-columns ds column-name columns-selector map-fn)
(map-columns ds column-name new-type columns-selector map-fn)

rename-columnsclj

(rename-columns ds columns-mapping)
(rename-columns ds columns-selector columns-map-fn)

Rename columns with provided old -> new name map

Rename columns with provided old -> new name map
raw docstring

reorder-columnsclj

(reorder-columns ds columns-selector & columns-selectors)

Reorder columns using column selector(s). When column names are incomplete, the missing will be attached at the end.

Reorder columns using column selector(s). When column names are incomplete, the missing will be attached at the end.
raw docstring

select-columnsclj

(select-columns ds)
(select-columns ds columns-selector)
(select-columns ds columns-selector meta-field)

Select columns by (returns dataset):

  • name
  • sequence of names
  • map of names with new names (rename)
  • function which filter names (via column metadata)
Select columns by (returns dataset):

- name
- sequence of names
- map of names with new names (rename)
- function which filter names (via column metadata)
raw docstring

update-columnsclj

(update-columns ds columns-map)
(update-columns ds columns-selector update-functions)

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close