'Sort the table according to one or more keys. This operates
on the existing table and does not return a new table.
Parameters
keys : str or list of str
The key(s) to order the table by. If None, use the
primary index of the Table.
Examples
Create a table with 3 columns::
>>> t = Table([[\'Max\', \'Jo\', \'John\'], [\'Miller\',\'Miller\',\'Jackson\'],
...         [12,15,18]], names=(\'firstname\',\'name\',\'tel\'))
>>> print(t)
firstname   name  tel
Max  Miller  12
Jo  Miller  15
John Jackson  18
Sorting according to standard sorting rules, first \'name\' then \'firstname\'::
>>> t.sort([\'name\',\'firstname\'])
>>> print(t)
firstname   name  tel
John Jackson  18
Jo  Miller  15
Max  Miller  12'

def sort(self, keys=None):

    if (keys is None):
        if (not self.indices):
            raise ValueError(u'Table    sort    requires    input    keys    or    a    table    index')
        keys = [x.info.name for x in self.indices[0].columns]
    if isinstance(keys, six.string_types):
        keys = [keys]
    indexes = self.argsort(keys)
    sort_index = get_index(self, self[keys])
    if (sort_index is not None):
        prev_frozen = sort_index._frozen
        sort_index._frozen = True
    for col in self.columns.values():
        col[:] = col.take(indexes, axis=0)
    if (sort_index is not None):
        sort_index._frozen = prev_frozen
        sort_index.sort()
