我正在使用 np.genfromtxt 从文本文件中获取数据,但我无法理解此错误消息:
data = np.genfromtxt('ctr_tr3.txt', skip_header=2, names=True)
a=data['PO4']
Traceback (most recent call last):
File "C:\EclipseIndigoWorkspace\W2\src\Import.py", line 55, in <module>
data = np.genfromtxt('ctr_tr3.txt', skip_header=2, names=True)
File "C:\Python27\lib\site-packages\numpy\lib\npyio.py", line 1560, in genfromtxt
raise ValueError(errmsg)
ValueError: Some errors were detected !
Line #4 (got 10 columns instead of 11)
Line #5 (got 10 columns instead of 11)
Line #6 (got 10 columns instead of 11)
Line #7 (got 10 columns instead of 11)
Line #8 (got 10 columns instead of 11)
Line #9 (got 10 columns instead of 11)