Apr-15-2018, 02:35 AM
(This post was last modified: Apr-15-2018, 02:40 AM by david_ford.)
I keep getting the same error on this. The first row of the csv is column names, but they are not in double quotes. Might that be the issue?
(
changed encoding and it worked. Sorry for the bother. I should google first. Newbie frantic thrashing, what can I say.
(
Quote:base) C:\Users\DSNoS>python
Python 3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 10:22:32) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from datascience import Table >>> casesissuesproviders=Table.read_table('C:/users/dsnos/desktop/CaseIssuesProviders.csv')Traceback (most recent call last):
File "pandas/_libs/parsers.pyx", line 1175, in pandas._libs.parsers.TextReader._convert_tokens
File "pandas/_libs/parsers.pyx", line 1281, in pandas._libs.parsers.TextReader._convert_with_dtype
File "pandas/_libs/parsers.pyx", line 1297, in pandas._libs.parsers.TextReader._string_convert
File "pandas/_libs/parsers.pyx", line 1539, in pandas._libs.parsers._string_box_utf8
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x92 in position 7: invalid start byte
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\DSNoS\Anaconda3\lib\site-packages\datascience\tables.py", line 132, in read_table
df = pandas.read_table(filepath_or_buffer, *args, **vargs)
File "C:\Users\DSNoS\Anaconda3\lib\site-packages\pandas\io\parsers.py", line 709, in parser_f
return _read(filepath_or_buffer, kwds)
File "C:\Users\DSNoS\Anaconda3\lib\site-packages\pandas\io\parsers.py", line 455, in _read
data = parser.read(nrows)
File "C:\Users\DSNoS\Anaconda3\lib\site-packages\pandas\io\parsers.py", line 1069, in read
ret = self._engine.read(nrows)
File "C:\Users\DSNoS\Anaconda3\lib\site-packages\pandas\io\parsers.py", line 1839, in read
data = self._reader.read(nrows)
File "pandas/_libs/parsers.pyx", line 902, in pandas._libs.parsers.TextReader.read
File "pandas/_libs/parsers.pyx", line 924, in pandas._libs.parsers.TextReader._read_low_memory
File "pandas/_libs/parsers.pyx", line 1001, in pandas._libs.parsers.TextReader._read_rows
File "pandas/_libs/parsers.pyx", line 1130, in pandas._libs.parsers.TextReader._convert_column_data
File "pandas/_libs/parsers.pyx", line 1182, in pandas._libs.parsers.TextReader._convert_tokens
File "pandas/_libs/parsers.pyx", line 1281, in pandas._libs.parsers.TextReader._convert_with_dtype
File "pandas/_libs/parsers.pyx", line 1297, in pandas._libs.parsers.TextReader._string_convert
File "pandas/_libs/parsers.pyx", line 1539, in pandas._libs.parsers._string_box_utf8
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x92 in position 7: invalid start byte
>>>
changed encoding and it worked. Sorry for the bother. I should google first. Newbie frantic thrashing, what can I say.