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

Andreas Hilboll lists@hilboll...
Tue Sep 25 04:31:59 CDT 2012


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,

More information about the NumPy-Discussion mailing list