cumSum
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— whentrue, ignoresNAvalues (nullorNaN). Whenfalse, all values after firstNAwill beNaN(forDoubleandFloatcolumns) ornull(for integer columns).
Available for:
GroupBy DataFrame— cumulative sum per every data group
df.cumSum { weight }
df.weight.cumSum()
df.groupBy { city }.cumSum { weight }.concat()
24 October 2025