(cumsum-col ds column-name)(cumsum-col ds new-column-name column-name)Compute the cumulative sum of a column
(cumsum ds column-name)
(cumsum ds new-column-name column-name)
ds - A tech.ml.dataset (i.e a tablecloth dataset)new-column-name - optional Name for the column where newly computed values will go.
When ommitted new column name defaults to the keyword <old-column-name>-cumulative-sumcolumn-name - Name of the column to use to compute the cumulative sumA dataset with the additional column containing the cumulative sum.
Compute the cumulative sum of a column ## Usage `(cumsum ds column-name)` `(cumsum ds new-column-name column-name)` ## Arguments - `ds` - A `tech.ml.dataset` (i.e a `tablecloth` dataset) - `new-column-name` - __optional__ Name for the column where newly computed values will go. When ommitted new column name defaults to the keyword `<old-column-name>-cumulative-sum` - `column-name` - Name of the column to use to compute the cumulative sum ## Returns A dataset with the additional column containing the cumulative sum.
(lag ds column-name lag-size)(lag ds new-column-name column-name lag-size)Compute previous (lagged) values from one column in a new column, can be used e.g. to compare values behind the current value.
(lag ds column-name lag-size)
(lag ds new-column-name column-name lag-size)
ds - A tech.ml.dataset (i.e a tablecloth dataset)new-column-name - optional Name for the column where newly computed values will go.
When ommitted new column name defaults to the keyword <old-column-name>-lag-<lag-size>column-name - Name of the column to use to compute the lagged valueslag-size - positive integer indicating how many rows to skip over to compute the lagA dataset with the new column populated with the lagged values.
Compute previous (lagged) values from one column in a new column, can be used e.g. to compare values behind the current value. ## Usage `(lag ds column-name lag-size)` `(lag ds new-column-name column-name lag-size)` ## Arguments - `ds` - A `tech.ml.dataset` (i.e a `tablecloth` dataset) - `new-column-name` - __optional__ Name for the column where newly computed values will go. When ommitted new column name defaults to the keyword `<old-column-name>-lag-<lag-size>` - `column-name` - Name of the column to use to compute the lagged values - `lag-size` - positive integer indicating how many rows to skip over to compute the lag ## Returns A dataset with the new column populated with the lagged values.
(lead ds column-name lead-size)(lead ds new-column-name column-name lead-size)Compute next (lead) values from one column in a new column, can be used e.g. to compare values ahead of the current value.
(lead ds column-name lead-size)
(lead ds new-column-name column-name lead-size)
ds - A tech.ml.dataset (i.e a tablecloth dataset)new-column-name - optional Name for the column where newly computed values will go.
When ommitted new column name defaults to the keyword <old-column-name>-lead-<lead-size>column-name - Name of the column to use to compute the lead valueslead-size - positive integer indicating how many rows to skip over to compute the leadA dataset with the column populated with the lead values.
Compute next (lead) values from one column in a new column, can be used e.g. to compare values ahead of the current value. ## Usage `(lead ds column-name lead-size)` `(lead ds new-column-name column-name lead-size)` ## Arguments - `ds` - A `tech.ml.dataset` (i.e a `tablecloth` dataset) - `new-column-name` - __optional__ Name for the column where newly computed values will go. When ommitted new column name defaults to the keyword `<old-column-name>-lead-<lead-size>` - `column-name` - Name of the column to use to compute the lead values - `lead-size` - positive integer indicating how many rows to skip over to compute the lead ## Returns A dataset with the column populated with the lead values.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |