replace-blank-values
Description
replace-blank-values
adaptor replaces blank values in a datatable column.
This adaptor only replaces blank values, to replace existing values in a datatable column, use the replace-values-in-columns
adaptor. This adaptor may be used for a single column, or replacing blank values across multiple columns.
Inputs
data
Type: datatable
Required: Yes
The datatable containing blank values.
columns
Type: list
Required: Yes
The names of the columns in data
containing blank values.
new value
Type: text
Required: Yes
A value to replace blank values.
Outputs
data
Type: datatable
A datatable with the blank values replaced.
Examples
Example 1: Default behaviour.
Inputs:
data:
id | code | name |
---|---|---|
1 | GB | United Kingdom |
2 | TR | Turkey |
3 | US | |
4 | IND | India |
5 | IND | India |
6 | us |
columns:
name
new value:
United States
Outputs:
data
:
id | country code | country name |
---|---|---|
1 | GB | United Kingdom |
2 | TR | Turkey |
3 | US | United States |
4 | IND | India |
5 | IND | India |
6 | us | United States |
-> Replaced the blank values with United States
in the datatable.
Example 2: Replace blank values in multiple columns.
Inputs:
data:
id | code | name |
---|---|---|
1 | GB | United Kingdom |
2 | Turkey | |
3 | US | |
4 | IND | India |
5 | India | |
6 | us |
columns:
code, name
new value:
Missing
Outputs:
data
:
id | country code | country name |
---|---|---|
1 | GB | United Kingdom |
2 | Missing | Turkey |
3 | US | Missing |
4 | IND | India |
5 | Missing | India |
6 | us | Missing |
-> Replaced the blank values in the code and name columns with Missing
in the datatable.
Use Cases
Standardise values for missing information.
Filling in a column after joining datatables.
Last updated