Search code examples
ibm-cloudibm-watsonwatson-studio

Watson Studio Data Refine


I have two questions regarding the data refinery process in WS.

I have 200 Columns of data and when it was first loaded into the platform, by default everything is in the string type. How do I

  1. Change columns in a batch
  2. Specify the data type when I am uploading the data as using a CSV format file.

Solution

  • Regarding the first question, you can use operations (in Code an operation...) available from the dplyr R library. For example, in order to convert all double columns to the Double Type, you can use something like this:

    mutate_all(~ ifelse(is.na(as.double(.x)),.x,as.double(.x)))
    

    As for the second question, I think this is not possible, as long as you upload the data directly via browser.