Skip to content

Tpivot

flowtask.components.tPivot

tPivot

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

Bases: tPandas

tPivot

Overview

Pivoting a Dataframe to transpose a column into other columns.

Properties

.. table:: Properties :widths: auto

+------------------+----------+-----------+-----------------------------------------------------------------------------------+ | Name | Required | Type | Description | +------------------+----------+-----------+-----------------------------------------------------------------------------------+ | columns | Yes | list | The List of Columns to be Pivoted. | +------------------+----------+-----------+-----------------------------------------------------------------------------------+ | index | No | list | List of columns to be preserved, default to all columns less "values" | +------------------+----------+-----------+-----------------------------------------------------------------------------------+ | values | Yes | str | Columns that transpose the values for pivoted column(s). | +------------------+----------+-----------+-----------------------------------------------------------------------------------+

Return The dataframe Pivoted by "columns" with values using the list of "values".