'Return this object with all records sorted along axis using key as the index to the values to compare. Does not yet modify meta info.'

def rowsort(self, axis, key=0):

    keyList = self[key]
    order = keyList.argsort()
    if (type(axis) == int):
        ind = ([slice(None)] * axis)
        ind.append(order)
    elif isinstance(axis, basestring):
        ind = (slice(axis, order),)
    return self[tuple(ind)]
