---
title: "aggregated(on:into:transform:)"
framework: tabulardata
role: symbol
role_heading: Instance Method
path: "tabulardata/rowgroupingprotocol/aggregated(on:into:transform:)"
---

# aggregated(on:into:transform:)

Generates a data frame with a column for the group identifier and a column of values from the transform.

## Declaration

```swift
func aggregated<Element, Result>(on columnID: ColumnID<Element>, into aggregatedColumnName: String? = nil, transform: (DiscontiguousColumnSlice<Element>) throws -> Result) rethrows -> DataFrame
```

## Parameters

- `columnID`: A column identifier.
- `aggregatedColumnName`: The name of the aggregation column the method adds to the data frame.
- `transform`: A closure that transforms each group’s elements in the column.

## See Also

### Aggregating a Row Grouping

- [counts()](tabulardata/rowgroupingprotocol/counts().md)
- [counts(order:)](tabulardata/rowgroupingprotocol/counts(order:).md)
- [sums(_:_:order:)](tabulardata/rowgroupingprotocol/sums(_:_:order:).md)
- [sums(_:order:)](tabulardata/rowgroupingprotocol/sums(_:order:).md)
- [means(_:_:order:)](tabulardata/rowgroupingprotocol/means(_:_:order:).md)
- [means(_:order:)](tabulardata/rowgroupingprotocol/means(_:order:).md)
- [minimums(_:_:order:)](tabulardata/rowgroupingprotocol/minimums(_:_:order:).md)
- [minimums(_:order:)](tabulardata/rowgroupingprotocol/minimums(_:order:).md)
- [maximums(_:_:order:)](tabulardata/rowgroupingprotocol/maximums(_:_:order:).md)
- [maximums(_:order:)](tabulardata/rowgroupingprotocol/maximums(_:order:).md)
- [aggregated(on:naming:transform:)](tabulardata/rowgroupingprotocol/aggregated(on:naming:transform:).md)
