csv2arff: Online CSV --> ARFF conversion tool

This is an online tool for converting CSV (spreadsheet)format files to ARFF(Weka) format files.


CSV2ARFF home
Instructions
Changes
About the author

Instructions for the CSV to ARFF conversion tool

Marko Tkalčič, Septmeber 2008

The online csv2arff tool converts CSV formatted files into ARFF formatted files.

After an experiment data are usually merged into an excel table. From there it can be exported to the CSV (comma separated value) format. In order to use the WEKA data mining software the CSV file needs to be converted to the Weka's ARFF format.

Workflow

After the input data is properly prepared as a CSV file, the conversion is done in 2 steps.

Preparing the CSV file

The CSV file must contain the names of the attributes in the first line. All other lines should contain the data taken from your measurements.

Example: data from a color assignment experiment are stored in Microsoft Excel (or any other spreadsheet software) as a table (click here for the source file):

The content of the correct CSV source file looks like this:

id;R;G;B;color
1;105;30;255;blue
2;255;183;17;orange
3;255;53;221;violet
4;244;254;100;yellow
5;251;255;48;yellow
6;158;255;155;green
7;255;106;108;red
8;159;150;255;blue
9;71;228;109;green
10;255;45;178;violet
11;120;255;30;green
12;214;50;250;violet
13;255;176;40;orange
14;255;79;79;red
15;255;162;22;orange
16;255;247;114;yellow
17;61;180;254;blue
18;255;97;12;red
Note: the csv parser allows the use of comma "," or semicolon ";" to delimit the values.
Step 1: uploading of the CSV file

The CSV file is uploaded via the web interface. Before uploading make sure the CSV file meets the format requirements.

Step 2: Define the attributes' types

In the second step choose the attributes you want to include in the ARFF file and their type (numeric or nominal).

Then click the submit button. The server should return you a valid ARFF file that looks like this:

@relation whatever

@attribute R numeric
@attribute G numeric
@attribute B numeric
@attribute color { blue , orange , violet , yellow , green , red }

@data
105 , 30 , 255 , blue
255 , 183 , 17 , orange
255 , 53 , 221 , violet
244 , 254 , 100 , yellow
251 , 255 , 48 , yellow
158 , 255 , 155 , green
255 , 106 , 108 , red
159 , 150 , 255 , blue
71 , 228 , 109 , green
255 , 45 , 178 , violet
120 , 255 , 30 , green
214 , 50 , 250 , violet
255 , 176 , 40 , orange
255 , 79 , 79 , red
255 , 162 , 22 , orange
255 , 247 , 114 , yellow
61 , 180 , 254 , blue
255 , 97 , 12 , red
Questions?

For any questions, suggestions or comments, email me at marko.tkalcic@gmail.com/a>. Your feedback will be highly appreciated.