【发布时间】:2017-02-15 12:47:08
【问题描述】:
我正在使用
读取 csvnumpy.genfromtxt(csv_name, delimiter=',')
但我无法这样做,因为我的 csv 每行包含不同的列数。
o/p:
ValueError: Some errors were detected
Line #2 (got 8 columns instead of 7)
Line #3 (got 8 columns instead of 7)
Line #4 (got 8 columns instead of 7)
Line #6 (got 8 columns instead of 7)
Line #7 (got 5 columns instead of 7)
Line #8 (got 5 columns instead of 7)
Line #9 (got 5 columns instead of 7)
Line #10 (got 5 columns instead of 7)
可以用numpy做吗?
【问题讨论】: