I have a text file with many rows of data - the first piece of data in each row is a unix timestamp such as 1436472000
. I am using numpy.loadtxt
and in the parameters for converters I want to specify for it to convert the timestamp into whatever numpy understands as a date time. I know this needs to go after the 0:
in the curly brackets, but I can't work out how to convert it. I know a converter can be used from matplotlib.dates.strpdate2num
for normal dates, but I this won't work for unix timestamps.
Code:
timestamp, closep, highp, lowp, openp, volume = np.loadtxt(fileName,delimiter=",",unpack=True,converters={ 0: })
Thanks for help in advance, please ask if you would like me to clarify what I mean.