| SeriesModuleShiftK, T Method |
Returns a series with values shifted by the specified offset. When the offset is
positive, the values are shifted forward and first `offset` keys are dropped. When the
offset is negative, the values are shifted backwards and the last `offset` keys are dropped.
Expressed in pseudo-code:
result[k] = series[k - offset]
## Parameters
- `offset` - Can be both positive and negative number.
- `series` - The input series to be shifted.
## Remarks
If you want to calculate the difference, e.g. `s - (Series.shift 1 s)`, you can
use `Series.diff` which will be a little bit faster.
[category:Series transformations]
Namespace:
Deedle
Assembly:
Deedle (in Deedle.dll) Version: 1.2
Syntax public static Series<K, T> Shift<K, T>(
int offset,
Series<K, T> series
)
Parameters
- offset
- Type: SystemInt32
[Missing <param name="offset"/> documentation for "M:Deedle.SeriesModule.Shift``2(System.Int32,Deedle.Series{``0,``1})"]
- series
- Type: DeedleSeriesK, T
[Missing <param name="series"/> documentation for "M:Deedle.SeriesModule.Shift``2(System.Int32,Deedle.Series{``0,``1})"]
Type Parameters
- K
- T
Return Value
Type:
SeriesK,
T[Missing <returns> documentation for "M:Deedle.SeriesModule.Shift``2(System.Int32,Deedle.Series{``0,``1})"]
See Also