gpt4 book ai didi

Python 2.7 Anaconda Pandas 错误(Ubuntu 14.04)

转载 作者:行者123 更新时间:2023-12-04 19:02:52 24 4
gpt4 key购买 nike

我正在使用 python 2.7 上运行 Anaconda 的 udemy 数据科学类(class)。我的操作系统是 Ubuntu 14.04。

我在使用 pandas 模块时遇到以下错误:
Traceback (most recent call last):
File "/home/flyveren/PycharmProjects/Udemy/15_DataFrames.py", line 13, in <module>
nfl_frame = pd.read_clipboard()
File "/home/flyveren/anaconda/lib/python2.7/site-packages/pandas/io/clipboard.py", line 51, in read_clipboard
return read_table(StringIO(text), **kwargs)
File "/home/flyveren/anaconda/lib/python2.7/site-packages/pandas/io/parsers.py", line 474, in parser_f
return _read(filepath_or_buffer, kwds)
File "/home/flyveren/anaconda/lib/python2.7/site-packages/pandas/io/parsers.py", line 260, in _read
return parser.read()
File "/home/flyveren/anaconda/lib/python2.7/site-packages/pandas/io/parsers.py", line 721, in read
ret = self._engine.read(nrows)
File "/home/flyveren/anaconda/lib/python2.7/site-packages/pandas/io/parsers.py", line 1170, in read
data = self._reader.read(nrows)
File "pandas/parser.pyx", line 769, in pandas.parser.TextReader.read (pandas/parser.c:7544)
File "pandas/parser.pyx", line 791, in pandas.parser.TextReader._read_low_memory (pandas/parser.c:7784)
File "pandas/parser.pyx", line 844, in pandas.parser.TextReader._read_rows (pandas/parser.c:8401)
File "pandas/parser.pyx", line 831, in pandas.parser.TextReader._tokenize_rows (pandas/parser.c:8275)
File "pandas/parser.pyx", line 1742, in pandas.parser.raise_parser_error (pandas/parser.c:20691)
pandas.parser.CParserError: Error tokenizing data. C error: Expected 11 fields in line 5, saw 12

我试过conda uninstall pandas随后 conda install pandas再次看到,但结果相同。包在那里,如果我卸载并尝试再次运行缺少包的代码,它会告诉我一个错误,但是当它正确安装时它会给出这个错误。

有谁知道怎么回事?

最佳答案

因此,解决方案本质上是创建一个虚拟环境并独立安装所需的软件包。我相信对我的系统的依赖存在一些问题。

关于Python 2.7 Anaconda Pandas 错误(Ubuntu 14.04),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30861956/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com