REPLACING SPACE VALUES WITH MISSING VALUE

Hi KNIMERS, please i need to replace the cells filled with space with missing values(?)

i tried String Manipulation Node(strip) to remove space and repalce with missing Value but was futile

Please i need a way out with it

Thanks

Hi,

As I know, you cant set a missing value, but if you have space, you can convert it to empty

It can help you?

BR,

Denis

3 Likes

Hi @ajisafeadeoye

Edit: In order to not cause confusion with my answer, I will add this little explanation. My solution only applies if the cells are blank rather than containing spaces. It can be used if you want them to be converted to missing values (eg. have the red ? in the cell)

There may be other methods, but the one I know of is to use the -Column Auto Type Cast- node:

Change the missing value pattern to “Empty”:

Hope that helps,
Thanks
Heather

3 Likes

Hi @denisfi, you can use to toNull() function in String Manipulation to set it to missing, whereas toEmpty will convert missing values to an empty string, as you say.

@ajisafeadeoye, if you wanted to convert value that is an empty string,missing you could use:
toNull( $columname$ )

or if it could be any number of spaces and you want these to become missing too:
toNull(strip( $columname$ ) )

To do this across multiple columns, you could use String Manipulation (Multi column)
toNull(strip($$CURRENTCOLUMN$$)),

but the big problem with using String Manipulation Multi Column is that frustratingly you cannot select columns by Type (which I feel is an omission in this node), so you can’t just say you want to apply it to all the String columns. Hence you have to manually choose all the String columns, or else it will fail because the columns are of the wrong type for this function to work, and you don’t want to start using

toNull(strip(string($$CURRENTCOLUMN$$))),

because then that will change all the non-string columns to string!

7 Likes

Thank you for the time to respond

i will give a try

And This is the â– â– â– â– â– â– 

Thank you for being detailed

Thank you for the time

Thank you

1 Like

Thank you for the time to respond

let me see how that goes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.