![]() > 1122 self._engine = CParserWrapper(self.f, **self.options) ~\Anaconda3\lib\site-packages\pandas\io\parsers.py in _make_engine(self, engine) ~\Anaconda3\lib\site-packages\pandas\io\parsers.py in _init_(self, f, engine, **kwds)Ĩ93 self.options = kwds > 429 parser = TextFileReader(filepath_or_buffer, **kwds) ~\Anaconda3\lib\site-packages\pandas\io\parsers.py in _read(filepath_or_buffer, kwds) > 702 return _read(filepath_or_buffer, kwds) ~\Anaconda3\lib\site-packages\pandas\io\parsers.py in parser_f(filepath_or_buffer, sep, delimiter, header, names, index_col, usecols, squeeze, prefix, mangle_dupe_cols, dtype, engine, converters, true_values, false_values, skipinitialspace, skiprows, skipfooter, nrows, na_values, keep_default_na, na_filter, verbose, skip_blank_lines, parse_dates, infer_datetime_format, keep_date_col, date_parser, dayfirst, iterator, chunksize, compression, thousands, decimal, lineterminator, quotechar, quoting, doublequote, escapechar, comment, encoding, dialect, tupleize_cols, error_bad_lines, warn_bad_lines, delim_whitespace, low_memory, memory_map, float_precision) > 1 pd.read_csv(filepath '\2019HwyBridgesDelimitedUtah.csv', encoding = "iso-8859-1") is it possible that this error is not related to the read_csv statement? Why is the error still stating the utf-8 codec cant read something even when I change the encoding to something else?įull error text: UnicodeDecodeError Traceback (most recent call last) Pd.read_csv(filepath '\2019HwyBridgesDelimitedUtah.csv', encoding = "latin1")īut I seem to receive the same utf encoding error every time. Pd.read_csv(filepath '\2019HwyBridgesDelimitedUtah.csv', encoding = "us-ascii") I tried pd.read_csv(filepath '\2019HwyBridgesDelimitedUtah.csv', encoding = "ISO-8859–1") I have also tried specifying the encoding in the read_csv statement. However, my attempts to resolve the error have been unsuccessful.Īt first I tried opening the file and saving it with utf8 encoding in sublime text, but received the same error message. I understand this error occurs when a non UTF8 character exists in the data after reviewing this relevant thread. ![]() This returns a UnicodeDecodeError: UnicodeDecodeError: 'utf-8' codec can't decode byte 0x81 in position 11: invalid start byte ![]() Pd.read_csv(filepath '\2019HwyBridgesDelimitedUtah.csv') import pandas as pdįilepath = "D:\Datasets\2019HighwayBridgeInventory" I'm having trouble resolving an encoding error when reading a csv file using the pandas library. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |