On Fri, Sep 25, 2009 at 4:30 PM, Timmie <timmichel...@gmx-topmail.de> wrote: > Hello, > this may be a easier question. > > I want to load data into an structured array with getting the names from the > column header (names=True). > > The data looks like: > > ;month;day;hour;value > 1995;1;1;01;0 > > > but loading only works only if changed to: > > year;month;day;hour;value > 1995;1;1;01;0 > > > How do I read in the original data?
There's an assumption that the number of names is the same as the number of columns. You can just specify the names and skip reading the names from the file: numpy.genfromtext(filename, delimiter=';', skiprows=1, names=['year', 'month', 'day', 'hour', 'value']) Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma Sent from Norman, Oklahoma, United States _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion