def sort(self, cmp=None, key=None, reverse=False):
        def _DefaultKey(value):
            result = []
            for key in self.header:
                try:
                    result.append(float(value[key]))
                except ValueError:
                    result.append(value[key])
            return result
        key = key or _DefaultKey
        new_table = self._table[1:]
        if cmp is not None:
            key = cmp_to_key(cmp)
        new_table.sort(key=key, reverse=reverse)
        self._table = [self.header]
        self._table.extend(new_table)
        for index, row in enumerate(self._table):
            row.row = index