Click or drag to resize
FrameModuleReduceLevelR, K, T, C Method
Reduce the 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 reduces the values in each series using the preovided function `op` by applying `Series.reduceLevel`. Columns that cannot be converted to a type required by `op` are skipped. ## Example To sum the 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.reduceLevel fst (fun (a:float) b -> a + b) ## Remarks This function reduces values using a function `'T -> 'T -> 'T`. If you want to process an entire group of values at once, you can use `applyLevel` instead. [category:Hierarchical index operations]

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

Parameters

levelSel
Type: Microsoft.FSharp.CoreFSharpFuncR, K

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

op
Type: Microsoft.FSharp.CoreFSharpFuncT, FSharpFuncT, T

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

frame
Type: DeedleFrameR, C

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

Type Parameters

R
K
T
C

Return Value

Type: FrameK, C

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

See Also