Copy Column Values¶
The Copy Column Values task copies values from a given column to a new Column.
Table of Contents
When to use¶
To create a backup of a column’s values.
To copy values from one column into another.
To copy values from a column based on a criterion.
Quick Start¶
Let us start with the following sample data:
Student |
Science |
English |
French |
---|---|---|---|
Alice |
140 |
138 |
|
Bob |
135 |
145 |
|
Frank |
122 |
102 |
|
Judy |
185 |
135 |
In this sample data, it is evident that the student takes only one of the two language subjects. Our goal is to consolidate the values of English and French columns into a new column named Language
Student |
Science |
English |
French |
Language |
---|---|---|---|---|
Alice |
140 |
138 |
138 |
|
Bob |
135 |
145 |
145 |
|
Frank |
122 |
102 |
102 |
|
Judy |
185 |
135 |
135 |
Following are the steps to achieve our goal:
Open Data Preparation menu and click on Column Function
Select Copy Column Values
Choose the column English and add a condition that says English has Non Empty Values
Enter Language in the new column and hit APPLY. This will create a new column called Language and fill in the values from column English into column language wheresoever it has a value
Open Data Preparation menu and click on Column Function
Select Copy Column Values
Choose the language French and add a condition that says French has Non Empty Values
Select the column Language in result section and hit APPLY
Note: English and French can be removed by deleting columns
The resulting data should now look like below:
Student |
Science |
Language |
---|---|---|
Alice |
140 |
138 |
Bob |
135 |
145 |
Frank |
122 |
102 |
Judy |
185 |
135 |
Supported Options¶
This task takes the following inputs:
Copy from: The column from which you want to copy values from.
Condition: See Condition
Apply result into: This option allows configuration of the destination of the results by this task. See result documentation.
Note
You can copy a numeric column or a date column as a text column. This will set the format on the date/numeric columns to as seen currently on the grid. It cannot be edited later and will not reflect even if you change the format.
See also
The result column documentation
The numeric formatter documentation
The date formatter documentation