sort

Columns.sort(by: Optional[str] = None, key: Optional[Callable[[Column], Any]] = None, descending: Optional[bool] = None) 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)