Skip to content

Torder

flowtask.components.tOrder

tOrder

tOrder(loop=None, job=None, stat=None, **kwargs)

Bases: tPandas

tOrder

Overview

The tOrder class is a component designed to order a Pandas DataFrame by a specified column. It allows sorting the DataFrame either in ascending or descending order based on the specified column.

Properties

.. table:: Properties :widths: auto

+------------------+----------+-----------+-----------------------------------------------------------------------------------+ | Name | Required | Type | Description | +------------------+----------+-----------+-----------------------------------------------------------------------------------+ | columns | Yes | str | The name of the column to sort the DataFrame by. | +------------------+----------+-----------+-----------------------------------------------------------------------------------+ | ascending | No | bool | Specifies whether to sort the DataFrame in ascending order. Defaults to True. | +------------------+----------+-----------+-----------------------------------------------------------------------------------+

Return The dataframe ordinated by the column give it in the order_by either ascending or descending.

Example:

tOrder:
  columns:
  - district_id
  ascending: true