Wrong number of values ​​when importing csv to Weka

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

I get the error all the time: "the number of values ​​is incorrect. 140 read, 139 expected on line 3".

Csv has already been fixed with quotes around shortcuts. And I am calculating 140 values ​​in the first lines.

What is wrong here?

Link to the file .

+6
source share
8 answers

It turned out that the excel file I exported had a value somewhere out of scope.

I noticed this because all lines ended with a comma, not nothing.

Only the correct coverage copied into the document and working is carefully selected.

Hope this helps someone else too.

+11
source

I had the same error. !!!! I have found a solution.

Just remove the whole double quote, one quote from the .csv, .xls file.

i, e for eg. in the "Name" column, if the value is "john", it causes an error. Do this by removing quotes.

To remove all quotation marks, go to the excel FInd file and replace.

Find what - "

Replace with - (empty space)

+2
source

I also ran into the same problem when I used Weka and imported the csv file.

The problem is incorrect file formatting

In my file, there was a word in one of the GOV'T columns that I just did was deleted "and it is written with the whole word" GOVERNMENT "and it worked.

Hope this helps!

+1
source

I had the same error. The problem was the character quotation mark character in a string value. The solution for me was to close all string value in double quotes.

Therefore i need to convert

this: ...,Uncharted 3: Drake Deception,... to this: ...,"Uncharted 3: Drake Deception",... 

using weka v. 3.8.0

+1
source

This is due to the addition of an additional column. Therefore, to get rid of this error, select this entire column and delete this column. This should work fine. :)

0
source

I also ran into this error. My csv file contains floating numbers. I solved this problem by replacing "," with ".".,

0
source

For me it all worked. I replaced the "" with a space.

0
source

I had the same error before. I changed my .xls files without any spaces. Sometimes Uka loaded too much ",". But if I clean the clean ranks, than Uka may work.

0
source

Source: https://habr.com/ru/post/958316/


All Articles