Search code examples
algorithmcsvweka

Csv with Weka how to add comma as a value not a seperator


I have a dataset. With using this dataset, I must run machine learning algorithms. But my dataset has some elements which also has comma but when I convert CSV to Arff this comma values does not recognized.

Example;

a,b,c
asdasd'%sdas,1,5,4234

My elements are asdasd'%sdas 1,5 4234

But I could not handle the value has comma inside it. I tried these

a,b,c
asdasd'%sdas,1\,5,4234

a,b,c
asdasd'%sdas,"1,5",4234

How can I pass comma valued element while using weka? My another wonder is how pass an element as string which has special chars like "sdas&%',+" Is it possible or something similar with this?


Solution

  • The following should work:

    "asdasd'%sdas","1,5",4234
    

    You can send strings that contain special characters just like this.