code: def sort(self, key, reverse=False):
          
          if isinstance(key, int):
              index = key
          elif isinstance(key, basestring):
              index = self.get_column_index(key)
          else:
              raise TypeError("'key' must either be 'int' or 'str'")
          self._table.sort(key=operator.itemgetter(index), reverse=reverse)
docs: Stable sort of the table *IN-PLACE* with respect to a column.
  
          Parameters
          ----------
          key: int, str
              index or header of the column. Normal list rules apply.
          reverse : bool
              If `True` then table is sorted as if each comparison was reversed.