dataFrame.column.stat — sum()
Description
The sum() method of the stat object returns the sum of the values in the selected column.
Signature
dataFrame.column(columnName).stat.sum()Argument
columnName(string)- The name of the column from which to calculate the sum of values.
Returns
sum(number)- The sum of the values of the selected column.
Example
// get the sum of values of a column of the dataFrame
var sum = dataFrame.column('revenue').stat.sum();
// log the sum
notebook.log(sum);