Click or drag to resize
FrameModuleApplyLevelR, K, T, C Method
Apply a specified function to a group of values in each series according to the specified level of a hierarchical row key. For each group of rows as specified by `levelSel`, the function applies the specified function `op` to all columns. Columns that cannot be converted to a type required by `op` are skipped. ## Example To get the standard deviation of values in all numerical columns according to the first component of a two level row key `'K1 * 'K2`, you can use the following: df |> Frame.applyLevel fst Stats.stdDev ## Remarks This function reduces a series of values using a function `Series<'R, 'T> -> 'T`. If you want to reduce values using a simpler function `'T -> 'T -> 'T`, you can use `Frame.reduceLevel` instead. [category:Hierarchical index operations]

Namespace:  Deedle
Assembly:  Deedle (in Deedle.dll) Version: 1.2
Syntax
C#
public static Frame<K, C> ApplyLevel<R, K, T, C>(
	FSharpFunc<R, K> levelSel,
	FSharpFunc<Series<R, T>, T> op,
	Frame<R, C> frame
)

Parameters

levelSel
Type: Microsoft.FSharp.CoreFSharpFuncR, K

[Missing <param name="levelSel"/> documentation for "M:Deedle.FrameModule.ApplyLevel``4(Microsoft.FSharp.Core.FSharpFunc{``0,``1},Microsoft.FSharp.Core.FSharpFunc{Deedle.Series{``0,``2},``2},Deedle.Frame{``0,``3})"]

op
Type: Microsoft.FSharp.CoreFSharpFuncSeriesR, T, T

[Missing <param name="op"/> documentation for "M:Deedle.FrameModule.ApplyLevel``4(Microsoft.FSharp.Core.FSharpFunc{``0,``1},Microsoft.FSharp.Core.FSharpFunc{Deedle.Series{``0,``2},``2},Deedle.Frame{``0,``3})"]

frame
Type: DeedleFrameR, C

[Missing <param name="frame"/> documentation for "M:Deedle.FrameModule.ApplyLevel``4(Microsoft.FSharp.Core.FSharpFunc{``0,``1},Microsoft.FSharp.Core.FSharpFunc{Deedle.Series{``0,``2},``2},Deedle.Frame{``0,``3})"]

Type Parameters

R
K
T
C

Return Value

Type: FrameK, C

[Missing <returns> documentation for "M:Deedle.FrameModule.ApplyLevel``4(Microsoft.FSharp.Core.FSharpFunc{``0,``1},Microsoft.FSharp.Core.FSharpFunc{Deedle.Series{``0,``2},``2},Deedle.Frame{``0,``3})"]

See Also