Skip to content
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

Pandas parsing error #3

Closed
Mustyy opened this issue Nov 7, 2017 · 2 comments
Closed

Pandas parsing error #3

Mustyy opened this issue Nov 7, 2017 · 2 comments

Comments

@Mustyy
Copy link

Mustyy commented Nov 7, 2017

when I run the code with python2 or python3 it throws this error, even though it worked before.

Training the classifier. Please wait 30 seconds.
Traceback (most recent call last):
File "BotDetection.py", line 152, in
test_df = pd.read_csv(filepath + 'test_data_4_students.csv' , sep='\t', encoding='ISO-8859-1')
File "/usr/local/lib/python3.5/dist-packages/pandas/io/parsers.py", line 655, in parser_f
return _read(filepath_or_buffer, kwds)
File "/usr/local/lib/python3.5/dist-packages/pandas/io/parsers.py", line 411, in _read
data = parser.read(nrows)
File "/usr/local/lib/python3.5/dist-packages/pandas/io/parsers.py", line 1005, in read
ret = self._engine.read(nrows)
File "/usr/local/lib/python3.5/dist-packages/pandas/io/parsers.py", line 1748, in read
data = self._reader.read(nrows)
File "pandas/_libs/parsers.pyx", line 890, in pandas._libs.parsers.TextReader.read (pandas/_libs/parsers.c:10862)
File "pandas/_libs/parsers.pyx", line 912, in pandas._libs.parsers.TextReader._read_low_memory (pandas/_libs/parsers.c:11138)
File "pandas/_libs/parsers.pyx", line 966, in pandas._libs.parsers.TextReader._read_rows (pandas/_libs/parsers.c:11884)
File "pandas/_libs/parsers.pyx", line 953, in pandas._libs.parsers.TextReader._tokenize_rows (pandas/_libs/parsers.c:11755)
File "pandas/_libs/parsers.pyx", line 2184, in pandas._libs.parsers.raise_parser_error (pandas/_libs/parsers.c:28765)
pandas.errors.ParserError: Error tokenizing data. C error: Expected 10 fields in line 3, saw 105

@jubins
Copy link
Owner

jubins commented Nov 8, 2017

Fixed this bug.
Please re-pull the changes or download the updated code from here.

@jubins
Copy link
Owner

jubins commented Nov 9, 2017

@Mustyy If code is working at your end, please close this issue.

@Mustyy Mustyy closed this as completed Nov 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants