On Fri, Jun 29, 2012 at 12:02 PM, Andreas Hilboll <li...@hilboll.de> wrote: > > You could use numpy.genfromtxt together with its `converters` parameter: > > converters : variable, optional > The set of functions that convert the data of a column to a value. > The converters can also be used to provide a default value > for missing data: ``converters = {3: lambda s: float(s or 0)}``.
I finally used: def mkdate(text): return(dt.datetime.strptime(text.decode('utf8'),\ '%H:%M:%S %d/%m/%Y')) and data = np.genfromtxt(\ os.path.join(sys.argv[1],f),\ delimiter=',',\ skip_header=4,\ usecols = (0, 1, 2),\ dtype=(object, float, float),\ converters={0: mkdate},\ autostrip=True,\ ) Thank you! ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users