aggregated(on:naming:transform:)
Generates a data frame by aggregating each group’s contents for each column you select by name.
Declaration
func aggregated<Element, Result>(on columnNames: [String], naming: (String) -> String, transform: (DiscontiguousColumnSlice<Element>) throws -> Result?) rethrows -> DataFrameParameters
- columnNames:
A comma-separated, or variadic, list of column names.
- naming:
A closure that converts a column name to another name.
- transform:
A closure that aggregates a group’s elements in a specific column.
Discussion
The data frame contains two columns that:
Identify each group
Store the results of your aggregation transform closure