Skip to content

Tconcat

flowtask.components.tConcat

tConcat

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

Bases: FlowComponent

tConcat

Overview

    The tConcat class is a component for merging (concatenating) two DataFrames along a specified axis.
    It supports handling multiple DataFrames and configurable options for the concatenation, with metrics
    tracking for input and output row counts.

.. table:: Properties
:widths: auto

    +----------------+----------+-----------+---------------------------------------------------------------+
    | Name           | Required | Summary                                                                   |
    +----------------+----------+-----------+---------------------------------------------------------------+
    | df1            |   Yes    | The first DataFrame to concatenate.                                       |
    +----------------+----------+-----------+---------------------------------------------------------------+
    | df2            |   Yes    | The second DataFrame to concatenate.                                      |
    +----------------+----------+-----------+---------------------------------------------------------------+
    | args           |   No     | Dictionary of arguments to pass to `pandas.concat`, such as `axis`.       |
    +----------------+----------+-----------+---------------------------------------------------------------+

Returns

    This component returns a concatenated DataFrame based on the specified axis and additional arguments.
    Metrics are recorded for the row counts of both input DataFrames and the final concatenated DataFrame.
    If either DataFrame is missing or empty, an error is raised with a descriptive message.


Example:

```yaml
tConcat:
  depends:
  - TransformRows_8
  - TransformRows_15
  args:
    axis: 0
```

start async

start(**kwargs)

Obtain Pandas Dataframe. TODO: iterate over all dataframes.