Creates a lookup for the data frame according to the specified key selector
and element selector function.
Namespace:
Extreme.DataAnalysis.Linq
Assembly:
Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.1
public static LinqExtensionsLookup<TKey, TElement> ToLookup<R, C, TKey, TElement>(
this DataFrame<R, C> frame,
Func<DataFrameRow<R, C>, TKey> keySelector,
Func<DataFrameRow<R, C>, TElement> elementSelector
)
<ExtensionAttribute>
Public Shared Function ToLookup(Of R, C, TKey, TElement) (
frame As DataFrame(Of R, C),
keySelector As Func(Of DataFrameRow(Of R, C), TKey),
elementSelector As Func(Of DataFrameRow(Of R, C), TElement)
) As LinqExtensionsLookup(Of TKey, TElement)
public:
[ExtensionAttribute]
generic<typename R, typename C, typename TKey, typename TElement>
static LinqExtensionsLookup<TKey, TElement>^ ToLookup(
DataFrame<R, C>^ frame,
Func<DataFrameRow<R, C>^, TKey>^ keySelector,
Func<DataFrameRow<R, C>^, TElement>^ elementSelector
)
[<ExtensionAttribute>]
static member ToLookup :
frame : DataFrame<'R, 'C> *
keySelector : Func<DataFrameRow<'R, 'C>, 'TKey> *
elementSelector : Func<DataFrameRow<'R, 'C>, 'TElement> -> LinqExtensionsLookup<'TKey, 'TElement>
Parameters
- frame
- Type: Extreme.DataAnalysisDataFrameR, C
A data frame to project. - keySelector
- Type: SystemFuncDataFrameRowR, C, TKey
A function to extract a key from each row. - elementSelector
- Type: SystemFuncDataFrameRowR, C, TElement
A function that transforms each row into a result.
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 returned by keySelector.
- TElement
- The type of the result returned by elementSelector.
Return Value
Type:
LinqExtensionsLookupTKey,
TElementA
LinqExtensionsLookupTKey, T that contains keys and values.
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