| SeriesExtensionsSampleV Method (SeriesDateTimeOffset, V, DateTimeOffset, TimeSpan, Direction) |
Finds values at, or near, the specified times in a given series. The operation generates
keys starting at the specified `start` time, using the specified `interval`
and then finds nearest smaller values close to such keys according to `dir`.
## Parameters
- `series` - An input series to be resampled
- `start` - The initial time to be used for sampling
- `interval` - The interval between the individual samples
- `lookup` - Specifies how the lookup based on keys is performed. `Exact` means that the
values at exact keys will be returned; `NearestGreater` returns the nearest greater key value
(starting at the first key) and `NearestSmaller` returns the nearest smaller key value
(starting at most `interval` after the end of the series)
## Remarks
This operation is only supported on ordered series. The method throws
`InvalidOperationException` when the series is not ordered.
[category:Lookup, resampling and scaling]
Namespace:
Deedle
Assembly:
Deedle (in Deedle.dll) Version: 1.2
Syntax public static Series<DateTimeOffset, V> Sample<V>(
this Series<DateTimeOffset, V> series,
DateTimeOffset start,
TimeSpan interval,
Direction dir
)
Parameters
- series
- Type: DeedleSeriesDateTimeOffset, V
[Missing <param name="series"/> documentation for "M:Deedle.SeriesExtensions.Sample``1(Deedle.Series{System.DateTimeOffset,``0},System.DateTimeOffset,System.TimeSpan,Deedle.Direction)"]
- start
- Type: SystemDateTimeOffset
[Missing <param name="start"/> documentation for "M:Deedle.SeriesExtensions.Sample``1(Deedle.Series{System.DateTimeOffset,``0},System.DateTimeOffset,System.TimeSpan,Deedle.Direction)"]
- interval
- Type: SystemTimeSpan
[Missing <param name="interval"/> documentation for "M:Deedle.SeriesExtensions.Sample``1(Deedle.Series{System.DateTimeOffset,``0},System.DateTimeOffset,System.TimeSpan,Deedle.Direction)"]
- dir
- Type: DeedleDirection
[Missing <param name="dir"/> documentation for "M:Deedle.SeriesExtensions.Sample``1(Deedle.Series{System.DateTimeOffset,``0},System.DateTimeOffset,System.TimeSpan,Deedle.Direction)"]
Type Parameters
- V
Return Value
Type:
SeriesDateTimeOffset,
V[Missing <returns> documentation for "M:Deedle.SeriesExtensions.Sample``1(Deedle.Series{System.DateTimeOffset,``0},System.DateTimeOffset,System.TimeSpan,Deedle.Direction)"]
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
SeriesDateTimeOffset,
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