Files
2026-02-08 11:20:43 -10:00

941 B
Vendored

Computes the cumulative sum of values in the selected columns.

cumSum(skipNA = true) [ { columns } ]

Returns a DataFrame or DataColumn containing the cumulative sum.

See column selectors for how to select the columns for this operation.

Parameters:

  • skipNA — when true, ignores NA values (null or NaN). When false, all values after first NA will be NaN (for Double and Float columns) or null (for integer columns).

Available for:

df.cumSum { weight }
df.weight.cumSum()
df.groupBy { city }.cumSum { weight }.concat()