python 中pandas 读取简称所有的列 报错

self.word_list = pd.read_csv('./word.csv', usecols=['简称'])

https://img1.mukewang.com/5bd0765d00011ccd07380445.jpg


报错如下

Traceback (most recent call last):

  File "baidusearch.py", line 28, in <module>

    baidusearch().get_content()

  File "baidusearch.py", line 8, in __init__

    self.word_list = pd.read_csv('./word.csv', usecols=['简称'])

  File "/usr/lib64/python3.4/site-packages/pandas/io/parsers.py", line 709, in parser_f

    return _read(filepath_or_buffer, kwds)

  File "/usr/lib64/python3.4/site-packages/pandas/io/parsers.py", line 449, in _read

    parser = TextFileReader(filepath_or_buffer, **kwds)

  File "/usr/lib64/python3.4/site-packages/pandas/io/parsers.py", line 818, in __init__

    self._make_engine(self.engine)

  File "/usr/lib64/python3.4/site-packages/pandas/io/parsers.py", line 1049, in _make_engine

    self._engine = CParserWrapper(self.f, **self.options)

  File "/usr/lib64/python3.4/site-packages/pandas/io/parsers.py", line 1695, in __init__


不负相思意
浏览 1352回答 1
1回答
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Python