datatable.Frame.sum1()

Calculate the sum of all values for a one-column column frame and return it as a scalar.

This function is a shortcut for:

DT.sum()[0, 0]

Parameters

return
None | float

None is returned for non-numeric columns.

except
ValueError

If called on a Frame that has more or less than one column.

See Also

  • .sum() – similar to this method, but can be applied to a Frame with an arbitrary number of columns.

  • dt.sum() – function for calculating the sum of all the values in a column or an expression; can also be applied per-group.