'Return the indices which would sort the table according to one or
more key columns.  This simply calls the `numpy.argsort` function on
the table with the ``order`` parameter set to ``keys``.
Parameters
keys : str or list of str
The column name(s) to order the table by
kind : {\'quicksort\', \'mergesort\', \'heapsort\'}, optional
Sorting algorithm.
Returns
index_array : ndarray, int
Array of indices that sorts the table by the specified key
column(s).'

def argsort(self, keys=None, kind=None):

    if isinstance(keys, six.string_types):
        keys = [keys]
    if (keys is not None):
        index = get_index(self, self[keys])
        if (index is not None):
            return index.sorted_data()
    kwargs = {}
    if keys:
        kwargs[u'order'] = keys
    if kind:
        kwargs[u'kind'] = kind
    if keys:
        data = self[keys].as_array()
    else:
        data = self.as_array()
    return data.argsort(**kwargs)
