<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "TabularData",
  "identifier" : "/documentation/TabularData/RowGroupingProtocol/aggregated(on:into:transform:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "TabularData"
    ],
    "preciseIdentifier" : "s:11TabularData19RowGroupingProtocolPAAE10aggregated2on4into9transformAA0B5FrameVAA8ColumnIDVyqd__G_SSSgqd_0_AA013DiscontiguousK5SliceVyqd__GKXEtKr0_lF"
  },
  "title" : "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.

```
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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)