I have multiple columns with “NA” and want to replace all of them with “none”. How would I do this? I tried the string manipulation (multi column) node but it did not work, it changed every cell in selected columns to none. I’ve tried the string replacer too but I have around 12 columns and I would need to do this for each column individually.
Hi @Subha_D try to use the “autotype cast” node by setting the “missing field value pattern” to NA then, after that, use the missing values node to replace with the word none
String Manipulation (Multi Column) should work with replace() function. How did you configure it?
Thanks @natanaeldgsantos it works!
Hi @ipazin I selected the columns i wanted to edit then used : replace(“NA”,“NA” ,“None” ). Not sure if this right though…
first argument is string/column(s) in which you would like to make replacement. In order to do it for multiple columns you should use currentColumn placeholder and include wanted columns. Something like this:
I once saw a solution from @ipazin in the forum where he unpivoted the data, did the replace and pivoted again. That should also work
here is workflow example on approach @Daniel_Weikert is talking about.
That seems to me way to go when in need to apply same expression/operation on multiple columns and can’t use String Manipulation/Math Formula (Multi Column) nodes.