Skip to content

Math func

Applies a mathematical function to the values of a (single) numeric column.

See numpy's documentation for further details about the supported functions.

Example

To calculate the logarithm of a column's values:

math_func(ds.input, {"func": "log"}) -> (ds.output)
More examples

Or to calculate the absolute (distance from 0, |x|) of a column's values:

math_func(ds.input, {"func": "absolute"}) -> (ds.output)

Usage

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

math_func(input: number, {"param": value}) -> (output: 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


input: column:number

Numeric input column to aplply function to.

Outputs


output: column:number

The result of calling the specified function on the input data.

Parameters


func: string

The name of the mathematical function to apply.

Must be one of: "absolute", "angle", "arccos", "arccosh", "arcsin", "arcsinh", "arctan", "arctanh", "around", "cbrt", "ceil", "conj", "conjugate", "cos", "cosh", "cumprod", "cumsum", "deg2rad", "degrees", "exp", "exp2", "expm1", "fabs", "fix", "floor", "gradient", "i0", "imag", "log", "log10", "log1p", "log2", "nan_to_num", "nancumprod", "nancumsum", "nanprod", "nansum", "negative", "positive", "prod", "rad2deg", "radians", "real", "real_if_close", "reciprocal", "rint", "round", "round_", "sign", "sin", "sinc", "sinh", "sqrt", "square", "sum", "tan", "tanh", "trunc"