> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coreweave.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quick Columns

> Add new columns to a dataset or update existing ones with calculations based on existing columns.

## 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 (for example, hour to seconds).
* Calculate material property based on temperature (for example, 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.

<table>
  <tbody>
    <tr>
      <th><p>Operation</p></th>
      <th><p>Inputs</p></th>
      <th><p>Results</p></th>
    </tr>

    <tr>
      <td><p>Difference</p></td>
      <td><p>Two columns</p></td>
      <td><p><code>Result = FirstColumn - SecondColumn</code></p></td>
    </tr>

    <tr>
      <td><p>Ratio</p></td>
      <td><p>Two columns</p></td>
      <td><p><code>Result = FirstColumn / SecondColumn</code></p></td>
    </tr>

    <tr>
      <td><p>Sum</p></td>
      <td><p>Multiple columns</p></td>
      <td><p><code>Result = column1 + column2 + ... + columnN</code></p></td>
    </tr>

    <tr>
      <td><p>Mean</p></td>
      <td><p>Multiple columns</p></td>
      <td><p><code>Result = mean(columns)</code></p></td>
    </tr>

    <tr>
      <td><p>Maximum</p></td>
      <td><p>Multiple columns</p></td>
      <td><p><code>Result = max(columns)</code></p></td>
    </tr>

    <tr>
      <td><p>Minimum</p></td>
      <td><p>Multiple columns</p></td>
      <td><p><code>Result = min(columns)</code></p></td>
    </tr>

    <tr>
      <td><p>Absolute value</p></td>
      <td><p>Single column</p></td>
      <td><p><code>Result = abs(column)</code></p></td>
    </tr>

    <tr>
      <td><p>Log10 value</p></td>
      <td><p>Single column</p></td>
      <td><p><code>Result = Log10(column)</code></p></td>
    </tr>

    <tr>
      <td><p>Anti-Log10 value</p></td>
      <td><p>Single column</p></td>
      <td><p><code>Result = 10column</code></p></td>
    </tr>

    <tr>
      <td><p>Split</p></td>

      <td>
        <p>Single column</p>
        <p>Additional parameters:</p>
        <p><strong>Separator</strong>: 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.</p>

        <img src="https://mintcdn.com/coreweave-dbfa0e8d/QRLrBgwZtalbZXz3/monolith-ai/_media/Quick-Columns-1.png?fit=max&auto=format&n=QRLrBgwZtalbZXz3&q=85&s=f929a346e9aed80cb2eda58d932644e8" alt="Separator input field used to split the data of the source column" width="640" height="400" data-path="monolith-ai/_media/Quick-Columns-1.png" />

        <img src="https://mintcdn.com/coreweave-dbfa0e8d/QRLrBgwZtalbZXz3/monolith-ai/_media/Quick-Columns-2.png?fit=max&auto=format&n=QRLrBgwZtalbZXz3&q=85&s=65923eb56b73cd60c07e9bc27884e289" alt="Index input field selecting which part of the split result to keep" width="640" height="400" data-path="monolith-ai/_media/Quick-Columns-2.png" />
      </td>

      <td><p>See examples below</p></td>
    </tr>

    <tr>
      <td><p>Multiply by constant</p></td>

      <td>
        <p>Single column<br />Aditionally, specify a <strong>scalar value</strong>:</p>

        <img src="https://mintcdn.com/coreweave-dbfa0e8d/QRLrBgwZtalbZXz3/monolith-ai/_media/Quick-Columns-3.png?fit=max&auto=format&n=QRLrBgwZtalbZXz3&q=85&s=d87af18bef07c119803668f69ffabb26" alt="Scalar value input field for the Multiply by constant operation" width="640" height="400" data-path="monolith-ai/_media/Quick-Columns-3.png" />
      </td>

      <td><p><code>Result = Scalar × column</code></p></td>
    </tr>

    <tr>
      <td><p>Constant value</p></td>

      <td>
        <p>Additional parameter: Constant value input field where the user can type any value (numerical or categorical).</p>

        <img src="https://mintcdn.com/coreweave-dbfa0e8d/QRLrBgwZtalbZXz3/monolith-ai/_media/Quick-Columns-4.png?fit=max&auto=format&n=QRLrBgwZtalbZXz3&q=85&s=42b9925a525949b875d4eff2a71aeb52" alt="Constant value input field showing an example value of Test 1" width="188" height="101" data-path="monolith-ai/_media/Quick-Columns-4.png" />
      </td>

      <td><p><code>Result = constant value</code></p></td>
    </tr>

    <tr>
      <td><p>Concatenate</p></td>

      <td>
        <p>Additional parameter: Separator (can be any string, for example: "<code> - </code>", "<code>:</code>", "<code> ; </code>", …).</p>

        <img src="https://mintcdn.com/coreweave-dbfa0e8d/QRLrBgwZtalbZXz3/monolith-ai/_media/Quick-Columns-5.png?fit=max&auto=format&n=QRLrBgwZtalbZXz3&q=85&s=de7319b74e8b49af54dfdfd5c0e4c134" alt="Separator input field for the Concatenate operation with a hyphen entered" width="148" height="92" data-path="monolith-ai/_media/Quick-Columns-5.png" />
      </td>

      <td><p><code>Result = column1 + Separator + column2 + Separator + ... + Separator + columnN</code></p></td>
    </tr>
  </tbody>
</table>

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   |

***

## 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. Our team can assist if this is the case.
