GroupingTemplate<TKey>.Bind Method

Binds this template to a data frame and returns a realized grouping.

Definition

Namespace: Numerics.NET.DataAnalysis
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.8.0
C#
public abstract Grouping<TKey> Bind(
	IDataFrame source
)

Parameters

source  IDataFrame
The data frame that supplies the grouping column.

Return Value

Grouping<TKey>
A realized grouping whose keys have type TKey.

Remarks

Binding resolves the template's column selector against the source data frame schema. Selector resolution uses schema metadata and preserves the normal selector behavior for missing explicit keys and key-type mismatches. The template must select exactly one column.

Exceptions

ArgumentNullExceptionsource is null.
InvalidOperationException The template cannot select exactly one grouping column from source.
InvalidCastException The selected grouping column cannot produce grouping keys of type TKey.

See Also