Skip to content

Sum

math

Calculate the row-wise sum of numeric columns.

An additional constant may be used to add to the final result.

Example

To add columns num1 and num2:

sum(ds.num1, ds.num2) -> (ds.total)
More examples

To add the constant 3.141 to column num1:

sum(ds.num1, {"constant": 3.141}) -> (ds.num1_plus_pi)

Usage

The following are the step's expected inputs and outputs and their specific types.

sum(*columns: number, {"param": value}) -> (result: number)

where the object {"param": value} is optional in most cases and if present may contain any of the parameters described in the corresponding section below.

Inputs


*columns: column:number

One or numeric columns to sum.

Outputs


result: column:number

Numeric column containing the result of the summation.

Parameters


constant: number

A constant to add.