-
Notifications
You must be signed in to change notification settings - Fork 604
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ValueError: invalid literal for int() with base 10: 'label' #16
Comments
Why would you try |
I’ll try to remove the column headers
Best,
Mustafa
… On Sep 26, 2018, at 11:37 AM, Abdul Fatir ***@***.***> wrote:
Why would you try int(float(...))?
Anyway, looks like your CSV headers are the cause of the problem. Remove the column names from the CSV or modify the code to skip that line.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I removed the headers but it still doesn’t work as well.
Any ideas why?
All the packages are installed too
Mustafa
… On Sep 26, 2018, at 11:37 AM, Abdul Fatir ***@***.***> wrote:
Why would you try int(float(...))?
Anyway, looks like your CSV headers are the cause of the problem. Remove the column names from the CSV or modify the code to skip that line.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Hi @abdulfatir and thank you for you sharing, I was able make the Preprocessing with train.csv with his 3 columns, but I got the same error although I remove the column names from test.csv , I think script process the data in the same way, how script can make the difference between train and test files ? |
In preprocess.py, for lines 71 and 107, change test_file=True |
Recheck the columns in your csv file. It might have the sentiment placed at some some another index. |
I had the same error, but it was an issue with my csv headers. Anyway, thanks for the great library Abdul! I found it very helpful :) |
Preprocessing still doesn't happen since there is an error in this line:
positive = int(line[:line.find(',')])
Here is the warning I get: ValueError: invalid literal for int() with base 10: 'label'
I looked up how to fix this and it looks like the string cannot be converted to int, so I tried int(float(...)) but didn't work
Any ideas?
The text was updated successfully, but these errors were encountered: