Description
This function provides a way to add new columns to your dataset or update existing ones. This can be done by calculations based on existing columns.
Application
Whenever an information is missing in your dataset which can be derived from existing columns you can use Quick Columns for this. Examples are:
- Convert units of an existing column (e.g. hour to seconds).
- Calculate material property based on temperature (e.g. density).
- Add a label or boolean column based on other columns which can be used to filter later.
- Create a quantity of interest based on multiple existing columns, like a ratio of different parameters.
How to use
- Choose the dataset to work on in the field Data.
- Specify the Name of the new column. This will be the ID by which the new column can be referenced. If you put in the name of an existing column that column will be overwritten.
- Choose the Operation by which to calculate the new column. Your choice determines which further fields appear and need to be filled.
- After you filled all fields you can choose if you want to overwrite the current dataset (which will usually just have one column more) or save a copy of the resulting dataset under a new name by choosing Save output under different name.
- Click Apply to execute the step.
Available Operations
The inputs are described in a separate table below.
Operation | Inputs | Results |
---|---|---|
Difference | Two columns | Result = FirstColumn - SecondColumn |
Ratio | Two columns | Result = FirstColumn / SecondColumn |
Sum | Multiple columns | Result = column1 + column2 + ... + columnN |
Mean | Multiple columns | Result = mean(columns) |
Maximum | Multiple columns | Result = max(columns) |
Minimum | Multiple columns | Result = min(columns) |
Absolute value | Single column | Result = abs(column) |
Log10 value | Single column | Result = Log10(column) |
Anti-Log10 value | Single column | Result = 10column |
Split | Single column Additional parameters: Separator: This can be any String and it will be used to split the data of the source column. The separator string itself will be removed from the result. Index: Which element of the split result is used as output of Quick Columns. The index is zero-based (i.e. first element has index 0). You can also use negative values; -1 is indicating you want to use the last element. | See examples below |
Multiply by constant | Single column Aditionally, specify a scalar value: | Result = Scalar × column |
Custom code … | Code field | Refer to Custom Code on the specifics of custom code on the Monolith platform and the article on differences between Custom Code and this operation. Try to write your transform within a single line of code. If you need more than one line the last line has to include a return statement. If you need several lines of code Custom Code is usually the better option. |
The input types referenced in the table above:
Input type | Description |
---|---|
Single column | Works on a single Column of your dataset. |
Two columns | Works on two columns in your dataset. You need to choose those in two fields which accept a single column each (First Column, Second Column). |
Multiple columns | You can choose as many columns from your dataset as you want. There is a single Columns field which accepts several choices. |
Examples
Find below some examples of the split operation
Input to Split | Separator | Index | Result |
---|---|---|---|
A_B_C_D | _ | 0 | A |
A_B_C_D | _ | 1 | B |
A_B_C_D | _ | -1 | D |
A_B_C_D | _ | -2 | C |
A_B_C_D | _B_ | 0 | A |
A_B_C_D | _B_ | 1 | C_D |
- You can overwrite an existing column by using the exact the same name in the field Name of the new column.
- If your transform is a more complex equation this requires several steps of Quick Columns. If your equation is very complex using one single step with a custom code operation might be the better option.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article