Skip to content

Multiply

fast step  math

Multiply two or more numeric columns.

An additional constant may be used to multiply the final result by.

Usage


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

Step signature
multiply(*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.

Example

To multiply two input columns factor1 and factor2:

Example call (in recipe editor)
multiply(ds.factor1, ds.factor2) -> (ds.product)
More examples

To multiply a single column by a factor of 3.0:

Example call (in recipe editor)
multiply(ds.num_column, {"constant": 3.0}) -> (ds.result)

Inputs


*columns: column:number

One or more columns to multiply.

Outputs


result: column:number

The result of the multiplication.

Parameters


constant: number

A constant to multiply by.


ignore_nans: boolean = False

Whether to ignore NaNs or propagate them.