One Logo Pool Ball
TabularData · IOS API REFERENCE

RowGroupingProtocol

protocol · iOS 15.0+ · SDK 27.1

protocol RowGroupingProtocol : CustomStringConvertible

A type that represents a collection of row selections that have the same value in a column.

Members (6)

method · iOS 15.0+

aggregated

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

Generates a data frame with a column for the group identifier and a column of values from the transform. - 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.

method · iOS 15.0+

randomSplit

Swift declaration
func randomSplit(by proportion: Double) -> (Self, Self)

Generates two row groupings by randomly splitting the original with a proportion. - Parameters proportion: A proportion in the range `[0.0, 1.0]`. - Returns: A tuple of two row groupings.

method · iOS 15.0+

sums

Swift declaration
func sums<N>(_ columnID: ColumnID<N>, order: Order? = nil) -> DataFrame where N : AdditiveArithmetic, N : Comparable

Generates a data frame that contains the sum of each group's rows along a column you select by column identifier. - Parameters: - columnID: A column identifier. - order: A sorting order the method uses to sort the data frame by its sum column.

method · iOS 15.0+

means

Swift declaration
func means<N>(_ columnID: ColumnID<N>, order: Order? = nil) -> DataFrame where N : FloatingPoint

Generates a data frame that contains the average mean of each group's rows along a column you select by column identifier. - Parameters: - columnID: A column identifier. - order: A sorting order the method uses to sort the data frame by its mean column.

method · iOS 15.0+

counts

Swift declaration
func counts() -> DataFrame

Generates a data frame with two columns, one that has a row for each group key and another for the number of rows in the group. The name of the data frame's column that stores the number of rows in each group is *count*.

method · iOS 15.0+

quantiles

Swift declaration
func quantiles<N>(_ columnID: ColumnID<N>, quantile: N, order: Order? = nil) -> DataFrame where N : BinaryFloatingPoint

Generates a data frame that contains the quantiles of each group's rows along a column you select by column identifier. - Parameters: - columnID: A column identifier. - quantile: A number between 0.0 and 1.0 that represents the percentage of the data that lies below the resulting value. - order: A sorting order the method uses to sort the data frame by its third quartile column. - Precondition: Quantile must be between 0.0 and 1.0.

Skipped declarations

9 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

RowGroupingProtocol.sums(_:_:order:)

Passing a Swift type itself is not supported.

RowGroupingProtocol.means(_:_:order:)

Passing a Swift type itself is not supported.

RowGroupingProtocol.quantiles(_:_:quantile:order:)

Passing a Swift type itself is not supported.

RowGroupingProtocol.minimums(_:_:order:)

Passing a Swift type itself is not supported.

RowGroupingProtocol.minimums(_:order:)

This declaration needs Swift generic type arguments. (no canonical witness for N)

RowGroupingProtocol.maximums(_:_:order:)

Passing a Swift type itself is not supported.

RowGroupingProtocol.maximums(_:order:)

This declaration needs Swift generic type arguments. (no canonical witness for N)

RowGroupingProtocol.aggregated(on:naming:transform:)

callback cannot propagate synchronous failure

RowGroupingProtocol.summary(of:)

A variable number of Swift arguments is not supported.

All TabularData types →