(self, value)
Order the rows of the table based on columns.

        Arguments:
            value: iterable or comma separated string of order by aliases.
Order the rows of the table based on columns.
Order the rows of the table based on columns .
def order_by(self, value):
        """
        Order the rows of the table based on columns.

        Arguments:
            value: iterable or comma separated string of order by aliases.
        """
        # collapse empty values to ()
        order_by = () if not value else value
        # accept string
        order_by = order_by.split(",") if isinstance(order_by, str) else order_by
        valid = []

        # everything's been converted to a iterable, accept iterable!
        for alias in order_by:
            name = OrderBy(alias).bare
            if name in self.columns and self.columns[name].orderable:
                valid.append(alias)
        self._order_by = OrderByTuple(valid)
        self.data.order_by(self._order_by)
def order_by ( self , value ) : # collapse empty values to () order_by = ( ) if not value else value # accept string order_by = order_by . split ( "," ) if isinstance ( order_by , str ) else order_by valid = [ ] # everything's been converted to a iterable, accept iterable! for alias in order_by : name = OrderBy ( alias ) . bare if name in self . columns and self . columns [ name ] . orderable : valid . append ( alias ) self . _order_by = OrderByTuple ( valid ) self . data . order_by ( self . _order_by )