Rankordering for nonparametric statistics (Newbie)

Ben Fairbank baf at texas.antispam.net
Sun Oct 12 19:11:16 EDT 2003


I have a matrix with many rows(say 1000 to make this concrete) and a
dozen or so columns.  One column has numbers ranging from 1 to several
hundred.  I have to create a new column with numbers from 1 to 1000
corresponding to the smallest to largest numbers (don't worry about
ties (yet)) in the column of interest.  The new number thus indicate
the ordinal or rank order of the values in the given column.  I have
been futzing around with argsort, but cannot find an elegant fast way
to do it.  Can a reader suggest?

Thank you,

BAFairbank




More information about the Python-list mailing list