Dataframe 0.13 Help

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 — 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()
Last modified: 29 March 2024