使用 csv2rec 时 python 中的 matplotlib 库出错
我正在 Ipython 中工作,尝试加载 csv 文件。
from matplotlib import *
data=matplotlib.mlab.csv2rec('helix.csv',delimiter='\t')
这是错误消息
IOError Traceback (most recent call last)
/mnt/hgfs/docs/python/<ipython console> in <module>()
/usr/lib/pymodules/python2.7/matplotlib/mlab.pyc in csv2rec(fname, comments, skiprows, checkrows, delimiter, converterd, names, missing, missingd, use_mrecords)
2125
2126 # reset the reader and start over
-> 2127 fh.seek(0)
2128 reader = csv.reader(fh, delimiter=delimiter)
2129 process_skiprows(reader)
IOError: [Errno 29] Illegal seek
有人已经运行过此错误吗?我尝试重新安装所有内容,我正在使用 Python2.7 并且有 Matplotlib v0.99.3、Numpy v1.5.1、Ipython0.10.1
I am working in Ipython, trying to load a csv file.
from matplotlib import *
data=matplotlib.mlab.csv2rec('helix.csv',delimiter='\t')
Here is the error message
IOError Traceback (most recent call last)
/mnt/hgfs/docs/python/<ipython console> in <module>()
/usr/lib/pymodules/python2.7/matplotlib/mlab.pyc in csv2rec(fname, comments, skiprows, checkrows, delimiter, converterd, names, missing, missingd, use_mrecords)
2125
2126 # reset the reader and start over
-> 2127 fh.seek(0)
2128 reader = csv.reader(fh, delimiter=delimiter)
2129 process_skiprows(reader)
IOError: [Errno 29] Illegal seek
Does someone already run on this error? I tried to re-install everything, I am working with Python2.7 and I have Matplotlib v0.99.3, Numpy v1.5.1, Ipython0.10.1
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我尝试使用此文件:
结果如下:
我有 matplotlib 1.0.1,因此您可以尝试更新它,我无法访问较旧的 matplotlib 进行测试。
I tried with this file:
and here is the result:
I have matplotlib 1.0.1, so you might try updating it, I do not have access to older matplotlib for testing.