|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
代码
import pandas as pd
import numpy as np
date = pd.read_csv("g:\测试.csv",)
data
错误提示
Traceback (most recent call last):
File "C:/Users/Administrator/PycharmProjects/pythonProject/venv/Scripts/2.py", line 3, in <module>
date = pd.read_csv("g:\测试.csv")
File "C:\Users\Administrator\PycharmProjects\pythonProject\venv\lib\site-packages\pandas\util\_decorators.py", line 211, in wrapper
return func(*args, **kwargs)
File "C:\Users\Administrator\PycharmProjects\pythonProject\venv\lib\site-packages\pandas\util\_decorators.py", line 331, in wrapper
return func(*args, **kwargs)
File "C:\Users\Administrator\PycharmProjects\pythonProject\venv\lib\site-packages\pandas\io\parsers\readers.py", line 950, in read_csv
return _read(filepath_or_buffer, kwds)
File "C:\Users\Administrator\PycharmProjects\pythonProject\venv\lib\site-packages\pandas\io\parsers\readers.py", line 605, in _read
parser = TextFileReader(filepath_or_buffer, **kwds)
File "C:\Users\Administrator\PycharmProjects\pythonProject\venv\lib\site-packages\pandas\io\parsers\readers.py", line 1442, in __init__
self._engine = self._make_engine(f, self.engine)
File "C:\Users\Administrator\PycharmProjects\pythonProject\venv\lib\site-packages\pandas\io\parsers\readers.py", line 1753, in _make_engine
return mapping[engine](f, **self.options)
File "C:\Users\Administrator\PycharmProjects\pythonProject\venv\lib\site-packages\pandas\io\parsers\c_parser_wrapper.py", line 79, in __init__
self._reader = parsers.TextReader(src, **kwds)
File "pandas\_libs\parsers.pyx", line 547, in pandas._libs.parsers.TextReader.__cinit__
File "pandas\_libs\parsers.pyx", line 636, in pandas._libs.parsers.TextReader._get_header
File "pandas\_libs\parsers.pyx", line 852, in pandas._libs.parsers.TextReader._tokenize_rows
File "pandas\_libs\parsers.pyx", line 1965, in pandas._libs.parsers.raise_parser_error
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xcd in position 0: invalid continuation byte
|
|