[Numpy-discussion] variable number of columns in loadtxt/genfromtxt

Andreas Hilboll lists at hilboll.de
Tue Sep 25 05:31:59 EDT 2012


Hi,

I commonly have to deal with legacy ASCII files, which don't have a
constant number of columns. The standard is 10 values per row, but
sometimes, there are less columns. loadtxt doesn't support this, and in
genfromtext, the rows which have less than 10 values are excluded from the
resulting array.

Is there any way around this?

Thanks for your insight,
Andreas.




More information about the NumPy-Discussion mailing list