Skip to main content

Math

Apply a mathematical calculation.

Apply mathematical calculations to columns. Also called as maths.

info

Spaces within column headers are replaced with underscores automatically. Account for this when writing expressions in input.

Parameters​

NameDescriptionAccepted ValuesDefaultRequired
I/O
inputThe mathematical expression using column names. e.g. column1 * column2 + column3. Note: spaces within column names are replaced by underscores (_).string—Yes
outputThe column to output the results to.string—Yes
Conditions
ifCondition that determines whether the wrangle runs as a whole. Recipe variables may be referenced with ${variable}.string—No
whereFilter rows before applying the wrangle using SQL-like criteria, such as column1 = 123 OR column2 = 'abc'.string—No
where_paramsValues used with where for parameterized criteria. Uses SQLite placeholder syntax such as ? or :name.array, object—No

Examples​

wrangles:
- math:
input: sqrt(Values)
output: Square Root
Values
4
9
16
Square Root
2
3
4
Access
RequirementValue
AI-poweredNo
Requires WrangleWorks accountNo
Requires subscriptionNo
Requires external API keyNo
Technical details
FieldValue
Catalog ID82
Catalog keymath
Recipe keymath
Catalog statusactive
Lifecycle statusactive
Recipe Writer eligibleYes
NamespaceRoot-level
Documentation groupcompute
AliasesNone
Runtime symbolwrangles.recipe_wrangles.main.math
Legacy UUID494b11ad-00c1-4748-8b93-6bec982f4fec

Sources