Hi, everyone
I have a question about reading column data from file.
helium.dat
He 1.31
He 1.32
He 1.39
He 1.41
He 1.38
He 1.39
He 1.21
He 1.45
He 2.31
I want to print just the 2nd column data(number) from helium.dat like below
1.31
1.32
1.39
1.41
1.38
1.39
1.21
1.45
2.31
from numpy import*
f = loadtxt("helium.dat")
data = f[:, 1]
for i in range(8):
print data[i]
I used this code, but that's wrong because loadtxt supports only numbers.
Please help me