Groups the rows of a data frame based on the specified key selector.
Namespace:
Extreme.DataAnalysis.Linq
Assembly:
Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.1
public static LinqExtensionsDataFrameLookup<TKey, R, C> GroupBy<R, C, TKey>(
this DataFrame<R, C> frame,
Func<DataFrameRow<R, C>, TKey> keySelector,
IEqualityComparer<TKey> comparer
)
<ExtensionAttribute>
Public Shared Function GroupBy(Of R, C, TKey) (
frame As DataFrame(Of R, C),
keySelector As Func(Of DataFrameRow(Of R, C), TKey),
comparer As IEqualityComparer(Of TKey)
) As LinqExtensionsDataFrameLookup(Of TKey, R, C)
public:
[ExtensionAttribute]
generic<typename R, typename C, typename TKey>
static LinqExtensionsDataFrameLookup<TKey, R, C>^ GroupBy(
DataFrame<R, C>^ frame,
Func<DataFrameRow<R, C>^, TKey>^ keySelector,
IEqualityComparer<TKey>^ comparer
)
[<ExtensionAttribute>]
static member GroupBy :
frame : DataFrame<'R, 'C> *
keySelector : Func<DataFrameRow<'R, 'C>, 'TKey> *
comparer : IEqualityComparer<'TKey> -> LinqExtensionsDataFrameLookup<'TKey, 'R, 'C>
Parameters
- frame
- Type: Extreme.DataAnalysisDataFrameR, C
A data frame. - keySelector
- Type: SystemFuncDataFrameRowR, C, TKey
A function that maps rows in the data frame
to a key of type TKey. - comparer
- Type: System.Collections.GenericIEqualityComparerTKey
A comparer for keys.
Type Parameters
- R
- The element type of the row index of the data frame.
- C
- The element type of the column index of the data frame.
- TKey
- The type of the key of the groups.
Return Value
Type:
LinqExtensionsDataFrameLookupTKey,
R,
CA
LinqExtensionsLookupTKey, T containing the
groupings of rows in
frame
where group membership is determined by applying
comparer
to the result of applying
keySelector
to each row of the data frame.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
DataFrameR,
C. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
Reference