ibis.expr.api.TableExpr.sort_by¶
-
TableExpr.
sort_by
(sort_exprs)¶ Sort table by the indicated column expressions and sort orders (ascending/descending)
- Parameters
sort_exprs (sorting expressions) –
- Must be one of:
Column name or expression
Sort key, e.g. desc(col)
(column name, True (ascending) / False (descending))
Examples
>>> import ibis >>> t = ibis.table([('a', 'int64'), ('b', 'string')]) >>> ab_sorted = t.sort_by([('a', True), ('b', False)])
- Returns
sorted
- Return type
TableExpr