My text file (test.out
) contains data arrangement are in three rows but the number of columns are different in each row. That is like shown below
2013 531 1155 24.0 L 19.219 76.766 0.2 JOY 3 0.0 0.4LJOY 1
CBN SZ IPg 1155 26.58 87 0.0110 15.1 134
CBN SN ESg 1155 28.38 87 -0.0210 15.1 134
It showing error while loading the data using import numpy as np
d1=np.genfromtxt('test.out', dtype=str)
it shows error message: raise ValueError(errmsg)
ValueError: Some errors were detected !
Line #2 (got 9 columns instead of 13)
Line #3 (got 9 columns instead of 13)
How it can be loaded using numpy genfromtxt
. If anybody can help it will be great help for me. Thanks in advance.