Table column operation mass
Apply operations stored in table to another table
Task to apply a list of operation contained in a table to another table. This is useful to apply a lot of operations.
The Calculation column
config defines operations to apply to the input table.
The input table must not contained special caracters in the column names
Examples
Let's say you have this Table
with the column A, B, C, D
A | B | C | D |
---|---|---|---|
1 | 10 | 11 | -9 |
2 | 8 | 10 | -6 |
3 | 6 | 9 | -3 |
Here is few example that you can write in the operations
column.
- Addition :
A + B + C
- Constant :
A + 10
- Subtraction :
A - C
- Multiplication :
A * C
- Division :
A / C
- Exponentiation :
A ** C
- Modulus :
A % C
- Floor division :
A // C
- Advanced exemple :
(A + B) / (C * D)
Comparaison
This task support comparaison, it will return the string True
or False
.
Comparaison operators : ==
, !=
, >
, <
, >=
and <=
Math functions
This task supports basic math functions : sin
, cos
, exp
, log
, expm1
, log1p
, sqrt
, sinh
, cosh
, tanh
, arcsin
, arccos
, arctan
, arccosh
, arcsinh
, arctanh
, abs
, arctan2
and log10
.
Example : log(A)
Only works if Error on unknown column
is checked
Error on unknown column
If Error on unknown column
is unchecked, the operation will not fail on unknow columns (the result for operations with unknown column will be 'NaN') but only basic operations and comparaison are supported (no functions).
If Error on unknown column
is checked, the operation will fail on unknow columns (raise an exception) but it supports all operations.
Input
Output
Configuration
name_column
Name of the column in Operation Table that contains operations' names. If not provided, the first column will be used
string
calculations_column
Name of the column in Operation Table that contains operations' calculations. If not provided, the second column will be used
string
keep_original_columns
If true, the original columns of the Table will be added at the end of the Table. If false, only the calculcation columns are kept.
bool
unknown_column_option
Option to apply when an unknown column is found in the operation table.
string
Error
Set result to NaN
Replace unknown columns with 0
Set result to NaN