Quick Columns

Modified on Mon, 2 Jan, 2023 at 6:47 PM

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.

OperationInputsResults
DifferenceTwo columnsResult = FirstColumn - SecondColumn
RatioTwo columnsResult = FirstColumn / SecondColumn
SumMultiple columnsResult = column1 + column2 + ... + columnN
MeanMultiple columnsResult = mean(columns)
MaximumMultiple columnsResult = max(columns)
MinimumMultiple columnsResult = min(columns)
Absolute valueSingle columnResult = abs(column)
Log10 valueSingle columnResult = Log10(column)
Anti-Log10 valueSingle columnResult = 10column
SplitSingle 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 constantSingle 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 typeDescription
Single columnWorks on a single Column of your dataset.
Two columnsWorks 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 columnsYou 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 SplitSeparatorIndexResult
A_B_C_D_0A
A_B_C_D_1B
A_B_C_D_-1D
A_B_C_D_-2C
A_B_C_D_B_0A
A_B_C_D_B_1C_D


More on this step

  • 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

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article