| SeriesK, VResampleTNewKey, R Method (IEnumerableK, Direction, FuncTNewKey, SeriesK, V, R, FuncK, SeriesK, V, TNewKey) |
Resample the series based on a provided collection of keys. The values of the series
are aggregated into chunks based on the specified keys. Depending on `direction`, the
specified key is either used as the smallest or as the greatest key of the chunk (with
the exception of boundaries that are added to the first/last chunk).
Such chunks are then aggregated using the provided `valueSelector` and `keySelector`
(an overload that does not take `keySelector` just selects the explicitly provided key).
## Parameters
- `keys` - A collection of keys to be used for resampling of the series
- `direction` - If this parameter is `Direction.Forward`, then each key is
used as the smallest key in a chunk; for `Direction.Backward`, the keys are
used as the greatest keys in a chunk.
- `valueSelector` - A function that is used to collapse a generated chunk into a
single value. Note that this function may be called with empty series.
- `keySelector` - A function that is used to generate a new key for each chunk.
## Remarks
This operation is only supported on ordered series. The method throws
`InvalidOperationException` when the series is not ordered.
[category:Resampling]
Namespace:
Deedle
Assembly:
Deedle (in Deedle.dll) Version: 1.2
Syntax public Series<TNewKey, R> Resample<TNewKey, R>(
IEnumerable<K> keys,
Direction direction,
Func<TNewKey, Series<K, V>, R> valueSelector,
Func<K, Series<K, V>, TNewKey> keySelector
)
Parameters
- keys
- Type: System.Collections.GenericIEnumerableK
[Missing <param name="keys"/> documentation for "M:Deedle.Series`2.Resample``2(System.Collections.Generic.IEnumerable{`0},Deedle.Direction,System.Func{``0,Deedle.Series{`0,`1},``1},System.Func{`0,Deedle.Series{`0,`1},``0})"]
- direction
- Type: DeedleDirection
[Missing <param name="direction"/> documentation for "M:Deedle.Series`2.Resample``2(System.Collections.Generic.IEnumerable{`0},Deedle.Direction,System.Func{``0,Deedle.Series{`0,`1},``1},System.Func{`0,Deedle.Series{`0,`1},``0})"]
- valueSelector
- Type: SystemFuncTNewKey, SeriesK, V, R
[Missing <param name="valueSelector"/> documentation for "M:Deedle.Series`2.Resample``2(System.Collections.Generic.IEnumerable{`0},Deedle.Direction,System.Func{``0,Deedle.Series{`0,`1},``1},System.Func{`0,Deedle.Series{`0,`1},``0})"]
- keySelector
- Type: SystemFuncK, SeriesK, V, TNewKey
[Missing <param name="keySelector"/> documentation for "M:Deedle.Series`2.Resample``2(System.Collections.Generic.IEnumerable{`0},Deedle.Direction,System.Func{``0,Deedle.Series{`0,`1},``1},System.Func{`0,Deedle.Series{`0,`1},``0})"]
Type Parameters
- TNewKey
- R
Return Value
Type:
SeriesTNewKey,
R[Missing <returns> documentation for "M:Deedle.Series`2.Resample``2(System.Collections.Generic.IEnumerable{`0},Deedle.Direction,System.Func{``0,Deedle.Series{`0,`1},``1},System.Func{`0,Deedle.Series{`0,`1},``0})"]
See Also