cumSum
Computes the cumulative sum of values in the selected columns.
cumSum(skipNA = true) [ { columns } ]
Returns a DataFrame
or DataColumn
containing the cumulative sum.
Parameters:
skipNA
— whentrue
, ignoresNA
values (null
orNaN
). Whenfalse
, all values after firstNA
will beNaN
(forDouble
andFloat
columns) 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()
Last modified: 09 December 2024