In [350]: txt ='''Time Freq
...: 8:00 91.1
...: 8:03 91.1
...: 8:06 91.1
...: 8:09 91.1
...: 8:12 91.1
...: 8:15 91.1
...: 8:18 91.1
...: 8:21 91.1
...: 8:24 91.1
...: 8:27 91.1
...: 8:30 91.1
...: '''
Loading as a structured array, using the first line as field names.
In [351]: data = np.genfromtxt(txt.splitlines(),names=True,dtype=None,encoding=N
...: one)
In [352]: data
Out[352]:
array([('8:00', 91.1), ('8:03', 91.1), ('8:06', 91.1), ('8:09', 91.1),
('8:12', 91.1), ('8:15', 91.1), ('8:18', 91.1), ('8:21', 91.1),
('8:24', 91.1), ('8:27', 91.1), ('8:30', 91.1)],
dtype=[('Time', '<U4'), ('Freq', '<f8')])
In [353]: data['Freq']
Out[353]: array([91.1, 91.1, 91.1, 91.1, 91.1, 91.1, 91.1, 91.1, 91.1, 91.1, 91.1])
Note that the 2nd column has been loaded as numbers, but the first as strings.
numpy.loadtexthave an optional parameter telling it to skip a header line? It isn't clear from your sample data that the first two words are on their own line. Please copy and paste the sample data and format it as code (select it and presctrl-k).loadtxtloads the data as floats, and raises an error when it can't.genfromtxtputsnanwhere it can't create the float. What do you want the result to look like?