|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
import pandas as pd
df = pd.read_csv('facility.csv')
以下是报错
C:\Users\swift\PycharmProjects\venv\Scripts\python.exe C:/Users/swift/PycharmProjects/pythonProject1/venv/facility_clean
Traceback (most recent call last):
File "C:/Users/swift/PycharmProjects/pythonProject1/venv/facility_clean", line 2, in <module>
df = pd.read_csv('facility.csv')
File "C:\Users\swift\PycharmProjects\venv\lib\site-packages\pandas\io\parsers.py", line 605, in read_csv
return _read(filepath_or_buffer, kwds)
File "C:\Users\swift\PycharmProjects\venv\lib\site-packages\pandas\io\parsers.py", line 463, in _read
return parser.read(nrows)
File "C:\Users\swift\PycharmProjects\venv\lib\site-packages\pandas\io\parsers.py", line 1052, in read
index, columns, col_dict = self._engine.read(nrows)
File "C:\Users\swift\PycharmProjects\venv\lib\site-packages\pandas\io\parsers.py", line 2056, in read
data = self._reader.read(nrows)
File "pandas\_libs\parsers.pyx", line 756, in pandas._libs.parsers.TextReader.read
File "pandas\_libs\parsers.pyx", line 771, in pandas._libs.parsers.TextReader._read_low_memory
File "pandas\_libs\parsers.pyx", line 827, in pandas._libs.parsers.TextReader._read_rows
File "pandas\_libs\parsers.pyx", line 814, in pandas._libs.parsers.TextReader._tokenize_rows
File "pandas\_libs\parsers.pyx", line 1943, in pandas._libs.parsers.raise_parser_error
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa0 in position 147918: invalid start byte
Process finished with exit code 1
|
|