- 积分
- 374
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2012-3-15
- 最后登录
- 1970-1-1
|
发表于 2016-11-7 11:31:23
|
显示全部楼层
ValueError Traceback (most recent call last)
<ipython-input-38-297e1490ce83> in <module>()
3 path_name='d:/pdata/'
4 title='16103020.0066'
----> 5 a=np.genfromtxt(fname=path_name+title,skip_header=3)
6 #file = open(path_name+title,'r')
7 #lineNum = 0
D:\anaconda2.4.2.0\lib\site-packages\numpy\lib\npyio.pyc in genfromtxt(fname, dtype, comments, delimiter, skip_header, skip_footer, converters, missing_values, filling_values, usecols, names, excludelist, deletechars, replace_space, autostrip, case_sensitive, defaultfmt, unpack, usemask, loose, invalid_raise, max_rows)
1767 # Raise an exception ?
1768 if invalid_raise:
-> 1769 raise ValueError(errmsg)
1770 # Issue a warning ?
1771 else:
ValueError: Some errors were detected !
Line #6 (got 161 columns instead of 13)
Line #8 (got 161 columns instead of 13)
Line #10 (got 161 columns instead of 13)
Line #12 (got 161 columns instead of 13)
可我这个加了skip_header之后读数据就一直报这个错误,是为什么呢? |
|