Deedle


DataSegment

Provides helper functions and active patterns for working with DataSegment values

Functions and values

Function or valueDescription
data ds
Signature:ds:DataSegment<'?9758> -> '?9758
Type parameters: '?9758

Returns the data property of the specified DataSegment<T>

kind ds
Signature:ds:DataSegment<'?9760> -> DataSegmentKind
Type parameters: '?9760

Returns the kind property of the specified DataSegment<T>

Active patterns

Active patternDescription
( |Any| ) ds
Signature:ds:DataSegment<'T> -> DataSegmentKind * 'T
Type parameters: 'T

A complete active pattern that extracts the kind and data from a DataSegment value. This makes it easier to write functions that only need data:

let sumAny = function DataSegment.Any(_, data) -> Series.sum data

( |Complete|Incomplete| ) ds
Signature:ds:DataSegment<'?9756> -> Choice<'?9756,'?9756>
Type parameters: '?9756

Complete active pattern that makes it possible to write functions that behave differently for complete and incomplete segments. For example, the following returns zero for incomplete segments:

let sumSegmentOrZero = function
  | DataSegment.Complete(value) -> Series.sum value
  | DataSegment.Incomplete _ -> 0.0
Fork me on GitHub