QDFile.sort(*order, **kargs)

Sort the data by column name.


order (column index or list of indices or callable function) – One or more sort order keys.

Keyword Arguments

reverse (boolean) – If true, the sorted array isreversed.


(self) – A copy of the DataFile sorted object


Sorts in place and returns a copy of the sorted data object fo chaining methods.

If the argument is a callable function then it should take a two tuple arguments and return +1,0,-1 depending on whether the first argument is bigger, equal or smaller. Otherwise if the argument is interpreted as a column index. If a single argument is supplied, then it may be a list of column indices. If no sort orders are supplied then the data is sorted by the DataFile.setas attribute or if that is not set, then order of the columns in the data.