FrameViewGroupByT(String, FuncFrameView, T, String) Method

Groups the data by the values in the given column, and computes the given aggregate quantity for each group.

Definition

Namespace: Meta.Numerics.Data
Assembly: Meta.Numerics (in Meta.Numerics.dll) Version: 4.2.0+6d77d64445f7d5d91b12e331399c4362ecb25333
C#
public FrameTable GroupBy<T>(
	string groupByColumnName,
	Func<FrameView, T> aggregator,
	string aggregateColumnName
)

Parameters

groupByColumnName  String
The name of the column to group by.
aggregator  FuncFrameView, T
A function that computes the aggregate quantity.
aggregateColumnName  String
The name of the column for the aggregate output.

Type Parameters

T
The type of the aggregate output.

Return Value

FrameTable
A new data frame containing the requested aggregate values for each group.

Remarks

The function that computes the aggregate receives a FrameView containing all the rows in the group. To produce an aggregate result, it can use values in any of the columns.

To produce more than one aggregate value, use GroupBy(String, FuncFrameView, IReadOnlyDictionaryString, Object).

See Also