Wrong number of values when importing csv in Weka

dorien picture dorien · Nov 18, 2013 · Viewed 26.8k times · Source

I want to open a csv file (saved from openoffice calc) in weka.

I keep getting an error: "wrong number of values. 140 read, 139 expected on line 3."

The csv was already fixed with quotes around the labels. And I count 140 values on the first lines.

What is wrong here?

Link to the file.

Answer

dorien picture dorien · Nov 18, 2013

Turns out there was an value somewhere for beyond sight in the excel file I was exporting.

I noticed it because all the rows ended with a comma instead of nothing.

Carefully selected only the right reach, copied in a document and works.

Hope this helps somebody else as well.