Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pandas as pd
- df_playoffs = pd.read_csv('/Users/hannahbeegle/Desktop/playoff_teams.csv.numbers', encoding='latin-1', index_col = 'team')
- df_playoffs.fillna('None', inplace=True)
- Traceback (most recent call last):
- File "/Users/hannahbeegle/Desktop/Baseball.py", line 130, in <module>
- df_playoffs = pd.read_csv('/Users/hannahbeegle/Desktop/playoff_teams.csv.numbers', encoding='latin-1', index_col = 'team')
- File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pandas/io/parsers.py", line 702, in parser_f
- return _read(filepath_or_buffer, kwds)
- File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pandas/io/parsers.py", line 435, in _read
- data = parser.read(nrows)
- File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pandas/io/parsers.py", line 1139, in read
- ret = self._engine.read(nrows)
- File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pandas/io/parsers.py", line 1995, in read
- data = self._reader.read(nrows)
- File "pandas/_libs/parsers.pyx", line 899, in pandas._libs.parsers.TextReader.read
- File "pandas/_libs/parsers.pyx", line 914, in pandas._libs.parsers.TextReader._read_low_memory
- File "pandas/_libs/parsers.pyx", line 968, in pandas._libs.parsers.TextReader._read_rows
- File "pandas/_libs/parsers.pyx", line 955, in pandas._libs.parsers.TextReader._tokenize_rows
- File "pandas/_libs/parsers.pyx", line 2172, in pandas._libs.parsers.raise_parser_error
- pandas.errors.ParserError: Error tokenizing data. C error: Expected 1 fields in line 3, saw 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement