I have a file with a time stamp as a column, and numbers in all the rest. I can either load one or the other correctly, but not both. Frustrating the heck out of me...
This is what I am doing:
import numpy as np
file = np.genfromtxt('myfile.dat', skip_header = 1, usecols = (0,1,2,3), dtype = (str, float), delimiter = '\t')
So column 0 is the timestamp, and I want to read it in as a string. The rest I want to read in as floats. Does anyone know how to do this? I tried fooling around with names and dtypes, but I cannot get anything to work.
Thanks.