-
Notifications
You must be signed in to change notification settings - Fork 82
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
AttributeError: '_csv.reader' object has no attribute 'next()' #2
Comments
The actual error is '_csv.reader' object has no attribute 'next' I tried googling and it said to use next() and thta is also working |
Hi, |
Worked. Thanks |
thanks,the issue is resolved |
i use this and still error |
#!/usr/bin/env python import csv csvr = csv.reader(open('fer2013.csv')) trn = [row[:-1] for row in rows if row[-1] == 'Training'] tst = [row[:-1] for row in rows if row[-1] == 'PublicTest'] tst2 = [row[:-1] for row in rows if row[-1] == 'PrivateTest'] And this my code |
this update works |
Thanks for help :-) |
I am at lesson 3.3 and rdd_csv_corrrect = rdd_no_header.map(lambda line: csv.reader([line]).next()) is giving an error in .next(). i am using python 3 here.
The error is AttributeError: '_csv.reader' object has no attribute 'next()'
I think this is more of an python2 v/s python3 issue, but need clarification as to how to resolve as this is becoming a show stopper :)
The text was updated successfully, but these errors were encountered: