# Data Aggregate

## Data Aggregate

### Input Data

|                         | Inputs                                                                                                                                                                                                                                                                                |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **\*Target Data**       | Data input                                                                                                                                                                                                                                                                            |
| **\*Output Name**       | Name of the data after aggregation                                                                                                                                                                                                                                                    |
| **\*Aggregation Items** | <p>Columns to perform aggregation. </p><ul><li><strong>Aggregator</strong>: user-selected aggregation method(Sum, Count, etc) .</li><li><strong>Variable Name</strong>: name of selected column.</li><li><strong>Alias Name</strong>: name of the column after aggregation.</li></ul> |
| Grouping Items          | A set of columns **C.** Before performing aggregation, data in **Aggregation Items** will be grouped by unique value sets in **C.**                                                                                                                                                   |

![\[Example of "group by" and aggregation\]](https://3929524962-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MGaxNdSdRN_L_WNiX4I%2F-MKYj3fY_Zr_x_Ypvm48%2F-MKYkUzOdL5GDNQeCzYM%2Fimage.png?alt=media\&token=29b56187-a079-4d05-abf8-3696abe672d9)

![\[Task information of Data Aggregate\]](https://3929524962-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MGaxNdSdRN_L_WNiX4I%2F-MKYil2F_zjcRl3Pgged%2F-MKYj0kPweM1MQQuduO-%2Fimage.png?alt=media\&token=d9512423-7592-4223-b44d-e9606071e5f9)

## Workflow Example

[R-Flow Task Example Video](https://www.youtube.com/watch?v=WD1s6lJ3E0s)

## Python Package

[**https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.aggregate.html**](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.aggregate.html)
