transformations:replace
This is an old revision of the document!
Table of Contents
REPLACE
Category: Transform / Basic
Description
This action replaces particular values in a column with new values. The new values can be either text or numbers. Multiple old values can be replaced with the same new value.
Action settings
Setting | Description |
---|---|
Column | Select the column in which values will be replaced. |
Before / After | Select the value(s) to be replaced and enter the new values in the text boxes that appear to the right. |
If a value to be replaced is missing | Select how EasyMorph will react if a selected value is not in the selected column. Options: Fail (An error will be displayed for his action.) or Ignore (missing values will be skipped and the action will replace existing values.). |
Show missing | This option only appears when Ignore is selected for the If a value to be replaced is missing option, above. The Before/After list will display the selected values that are missing in the column. |
The search box can be used to find a specific value in large value lists.
Use cases
Replacing mistyped names and words with correct ones.
If used together with the Sequence transformation, it allows defining relatively small custom lists. Use Replace to replace 1 with one custom value, 2 with another one, etc.
Examples
Example: Expand the names of the "America" values (N. > North, S. > South).
Source table: The longest rivers in the world
River | Length (km) | Length (miles) | Continent |
---|---|---|---|
Nile | 6650 | 4132 | Africa |
Amazon | 6400 | 3976 | S. America |
Yangtze | 6300 | 3917 | Asia |
Mississippi | 6275 | 3902 | N. America |
Transformation parameters:
Continent column.
(Before) N. America: (After) North America
(Before) S. America: (After) South America
Output table:
River | Length (km) | Length (miles) | Continent |
---|---|---|---|
Nile | 6650 | 4132 | Africa |
Amazon | 6400 | 3976 | South America |
Yangtze | 6300 | 3917 | Asia |
Mississippi | 6275 | 3902 | North America |
See Also
transformations/replace.1616345853.txt.gz · Last modified: 2021/03/21 12:57 by craigt