I have a txt file, which looks like that:
Description
Description
0 0 170. 170. 40.02 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 18.09228
1 0 170. 170. 70.80 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 12.09736
....
1 0 170. 170. 06.48 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 12.09736
I have tried to do this using:
data = np.loadtxt('Filename.txt', comments='#', delimiter=' ', skiprows=2)
But I get the error massage "could not convert string to float:" Probably it can occur because in the data there are different number of spaces between the columns.
Also I tried:
with open('Filename.txt') as f:
data = f.readlines()[2:]
But then I dont know how to split it into columns. I just need an array with numbers after 'description' to make some computations. I would really appreciate if someone could suggest a solution.