Reading thru various forum posts and I’m still struggling with replacing missing values. I have a large table where values are missing and are represented as a ? (i.e. null) and I’m simply trying to replace any null values w/a “X”. It seriously can’t be that hard, but I’ve been at it for a couple hours now unsuccessfully. Any input anyone?
Thanks in advance. Ryan
That’s a job for the Missing Value node. Simply add the column where you want to change null values and select what kind of replacement value you want to apply.
No problem, happens to all of us at some point If you encounter more complex situation in the future, you can also go the coding route but then I would recommend something like this (simple example):
if (column("column1") == null) {
"X"
} else {
column("column1")
}
The replace() can’t handle nulls like that since it’s looking for a string.