Jump to content

Recommended Posts

Posted

Hello!
I’ve got a dataset with 1050 attributes (all numerical) and in some values inside of these I have the “NaN” string, which means that I can’t turn them in to continuous attributes from nominal. Is there a quick way/task to change all “NaN” values in all attributes to blank values without applying a formula to each attribute? I tried the fill and clean task but I couldn’t figure out a way to use this one for this purpose.
Thank you in advance

Posted

Hi Mike! 

I see two feasible ways without inputting 1050 times:

  1. Applying ifelse formulas to all of them (you can use the copy-paste of formulas: you just write one formula, you select “Copy Formula”, then select all the columns and do “Paste Formula”)
    Pros: fewer tasks
    Cons: it depends on attribute names
     
  2. You convert all the columns into a long format, you do the operation on the unique remaining column and then convert back to wide format.
    Pros: it does not depend on attribute names
    Cons: more tasks and, potentially, more risk of running out of RAM (if the dataset is big, of course).

If you want, let me know which path you will choose 😉 

Have a nice day! 

  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...