[Numpy-discussion] More loadtxt() changes

Pierre GM pgmdevlist@gmail....
Tue Nov 25 12:16:31 CST 2008


On Nov 25, 2008, at 12:30 PM, Christopher Barker wrote:
>
> """
> missing : string, optional
>         A string representing a missing value, irrespective of the
> column where it appears (e.g., ``'missing'`` or ``'unused'``.
> """
>
> It might be nice if "missing" could be a sequence of strings, if there
> is more than one value for missing values, that are not clearly mapped
> to a particular field.

OK, easy enough.

> """
> missing_values : {None, dictionary}, optional
>         A dictionary mapping a column number to a string indicating
> whether the corresponding field should be masked.
> """
>
> would it possible to specify column header, rather than number here?

A la mlab.csv2rec ? It could work with a bit more tweaking, basically  
following John Hunter's et al. path. What happens when the column  
names are unknown (read from the header) or wrong ?

Actually, I'd like John to comment on that, hence the CC. More  
generally, wouldn't be useful to push the recarray manipulating  
functions from matplotlib.mlab to numpy ?


More information about the Numpy-discussion mailing list