sort¶
-
Columns.
sort
(by: Optional[str] = None, key: Optional[Callable[[getml.pipeline.column.Column], Any]] = None, descending: Optional[bool] = None) → getml.pipeline.columns.Columns[source]¶ Sorts the Columns container. If no arguments are provided the container is sorted by target and name.
- Args:
- by (str, optional):
- The name of field to sort by. Possible fields:
name(s)
table(s)
importances(s)
- key (callable, optional):
A callable that evaluates to a sort key for a given item.
- descending (bool, optional):
Whether to sort in descending order.
- Return:
getml.pipeline.columns
:A container of sorted columns.
- Example:
by_importance = my_pipeline.columns.sort(key=lambda column: column.importance)