Click or drag to resize
SeriesExtensionsShiftK, V 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.

Namespace:  Deedle
Assembly:  Deedle (in Deedle.dll) Version: 1.2
Syntax
C#
public static Series<K, V> Shift<K, V>(
	this Series<K, V> series,
	int offset
)

Parameters

series
Type: DeedleSeriesK, V

[Missing <param name="series"/> documentation for "M:Deedle.SeriesExtensions.Shift``2(Deedle.Series{``0,``1},System.Int32)"]

offset
Type: SystemInt32

[Missing <param name="offset"/> documentation for "M:Deedle.SeriesExtensions.Shift``2(Deedle.Series{``0,``1},System.Int32)"]

Type Parameters

K
V

Return Value

Type: SeriesK, V

[Missing <returns> documentation for "M:Deedle.SeriesExtensions.Shift``2(Deedle.Series{``0,``1},System.Int32)"]

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type SeriesK, V. 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).
See Also