Deedle


Deedle

Deedle

TypeDescription
Aggregation

Represents a strategy for aggregating data in an ordered series into data segments. To create a value of this type from C#, use the non-generic Aggregation type. Data can be aggregate using floating windows or chunks of a specified size or by specifying a condition on two keys (i.e. end a window/chunk when the condition no longer holds).

Aggregation

A non-generic type that simplifies the construction of Aggregation<K> values from C#. It provides methods for constructing different kinds of aggregation strategies for ordered series.

Boundary

Represents boundary behaviour for operations such as floating window. The type specifies whether incomplete windows (of smaller than required length) should be produced at the beginning (AtBeginning) or at the end (AtEnding) or skipped (Skip). For chunking, combinations are allowed too - to skip incomplete chunk at the beginning, use Boundary.Skip ||| Boundary.AtBeginning.

ColumnSeries
DataSegment

Represents a segment of a series or sequence. The value is returned from various functions that aggregate data into chunks or floating windows. The Complete case represents complete segment (e.g. of the specified size) and Boundary represents segment at the boundary (e.g. smaller than the required size).

DataSegmentKind

Represents a kind of DataSegment<T>. See that type for more information.

DelayedSeries

This type exposes a single static method DelayedSeries.Create that can be used for constructing data series (of type Series<K, V>) with lazily loaded data. You can use this functionality to create series that represents e.g. an entire price history in a database, but only loads data that are actually needed. For more information see the lazy data loading tutorial.

Example

Assuming we have a function generate lo hi that generates data in the specified DateTime range, we can create lazy series as follows:

let ls = DelayedSeries.Create(min, max, fun (lo, lob) (hi, hib) -> 
  async { 
    printfn "Query: %A - %A" (lo, lob) (hi, hib)
    return generate lo hi })

The arguments min and max specfify the complete range of the series. The function passed to Create is called with minimal and maximal required key (lo and hi) and with two values that specify boundary behaviour.

Direction

Specifies in which direction should we look when performing operations such as Series.Pairwise.

EnumerableExtensions
Frame

A frame contains one Index, with multiple Vecs (because this is dynamic, we need to store them as IVec)

Frame
FrameData

Represents the underlying (raw) data of the frame in a format that can be used for exporting data frame to other formats etc. (DataTable, CSV, Excel)

FrameExtensions

Some comment

ICustomLookup

Represents a special lookup. This can be used to support hierarchical or duplicate keys in an index. A key type K can come with associated ICustomLookup<K> to provide customized pattern matching (equality testing)

IFrame

An empty interface that is implemented by Frame<'R, 'C>. The purpose of the interface is to allow writing code that works on arbitrary data frames, although you

IFrameOperation
ISeries

Represents an untyped series with keys of type K and values of some unknown type (This type should not generally be used directly, but it can be used when you need to write code that works on a sequence of series of heterogeneous types).

IVector

A generic, typed vector. Represents mapping from addresses to values of type T. The vector provides a minimal interface that is required by series and can be implemented in a number of ways to provide vector backed by database or an alternative representation of data.

IVector

Represents an (untyped) vector that stores some values and provides access to the values via a generic address. This type should be only used directly when extending the DataFrame library and adding a new way of storing or loading data. To allow invocation via Reflection, the vector exposes type of elements as System.Type.

Index

Type that provides access to creating indices (represented as LinearIndex values)

JoinKind

This enumeration specifies joining behavior for Join method provided by Series and Frame. Outer join unions the keys (and may introduce missing values), inner join takes the intersection of keys; left and right joins take the keys of the first or the second series/frame.

KeyValue
Lookup

Represents different behaviors of key lookup in series. For unordered series, the only available option is Lookup.Exact which finds the exact key - methods fail or return missing value if the key is not available in the index. For ordered series Lookup.NearestGreater finds the first greater key (e.g. later date) with a value. Lookup.NearestSmaller searches for the first smaller key.

MissingValueException

Thrown when a value at the specified index does not exist in the data frame or series. This exception is thrown only when the key is defined, but the value is not available, in other situations KeyNotFoundException is thrown

ObjectSeries
OptionalValue

Value type that represents a potentially missing value. This is similar to System.Nullable<T>, but does not restrict the contained value to be a value type, so it can be used for storing values of any types. When obtained from DataFrame<R, C> or Series<K, T>, the Value will never be Double.NaN or null (but this is not, in general, checked when constructing the value).

The type is only used in C#-friendly API. F# operations generally use expose standard F# option<T> type instead. However, there the OptionalValue module contains helper functions for using this type from F# as well as Missing and Present active patterns.

OptionalValue

Non-generic type that makes it easier to create OptionalValue<T> values from C# by benefiting the type inference for generic method invocations.

OptionalValueExtensions

Extension methods for working with optional values from C#. These make it easier to provide default values and convert optional values to Nullable (when the contained value is value type)

RowSeries
Series

The type Series<K, V> represents a data series consisting of values V indexed by keys K. The keys of a series may or may not be ordered

SeriesBuilder
SeriesBuilder
SeriesExtensions
TryValue

Represents a value or an exception. This type is used by functions such as Series.tryMap and Frame.tryMap to capture the result of a lambda function, which may be either a value or an exception. The type is a discriminated union, so it can be processed using F# pattern matching, or using Value, HasValue and Exception properties

UnionBehavior

This enumeration specifeis the behavior of Union operation on series when there are overlapping keys in two series that are being unioned. The options include prefering values from the left/right series or throwing an exception when both values are available.

opt

A type alias for the OptionalValue<T> type. The type alias can be used to make F# type definitions that use optional values directly more succinct.

tryval

A type alias for the TryValue<T> type. The type alias can be used to make F# type declarations that explcitly handle exceptions more succinct.

ModuleDescription
Addressing

An Address value is used as an interface between vectors and indices. The index maps keys of various types to address, which is then used to get a value from the vector.

DataSegment

Provides helper functions and active patterns for working with DataSegment values

FSharpFrameExtensions
FSharpIndexExtensions

Defines non-generic Index type that provides functions for building indices (hard-bound to LinearIndexBuilder type). In F#, the module is automatically opened using AutoOpen. The methods are not designed for the use from C#.

FSharpSeriesExtensions
FSharpVectorExtensions

Defines non-generic Vector type that provides functions for building vectors (hard-bound to ArrayVectorBuilder type). In F#, the module is automatically opened using AutoOpen. The methods are not designed for the use from C#.

Frame

Frame module comment

FrameBuilder
MultiKeyExtensions

F#-friendly functions for creating multi-level keys and lookups

OptionalValue

Provides various helper functions for using the OptionalValue<T> type from F# (The functions are similar to those in the standard Option module).

Pair

Module with helper functions for extracting values from hierarchical tuples

Series

Series module comment..

VectorExtensions

Module with extensions for generic vector type. Given vec of type IVector<T>, the extension property vec.DataSequence returns all data of the vector converted to the "least common denominator" data structure - IEnumerable<T>.

Deedle.Indices

TypeDescription
AsyncSeriesConstruction

Asynchronous version of SeriesConstruction<'K>. Returns a workflow that evaluates the index, together with a construction to apply (asynchronously) on vectors

BoundaryBehavior

Specifies the boundary behavior for the IIndexBuilder.GetRange operation (whether the boundary elements should be included or not)

IIndex

An interface that represents index mapping keys of some generic type T to locations of address Address. The IIndex<K> contains minimal set of operations that have to be supported by an index. This type should be only used directly when extending the DataFrame library and adding a new way of storing or loading data. Values of this type are constructed using the associated IIndexBuilder type.

IIndexBuilder

A builder represents various ways of constructing index, either from keys or from other indices. The operations that build a new index from an existing index also build VectorConstruction which specifies how to transform vectors aligned with the previous index to match the new index. The methods generally take VectorConstruction as an input, apply necessary transformations to it and return a new VectorConstruction.

SeriesConstruction

Represents a pair of index and vector construction (many of the index operations take/return an index together with a construction command that builds a vector matching with the index, so this type alias makes this more obvious)

Deedle.Indices.Linear

TypeDescription
LinearIndex

An index that maps keys K to offsets Address. The keys cannot be duplicated. The construction checks if the keys are ordered (using the provided or the default comparer for K) and disallows certain operations on unordered indices.

LinearIndexBuilder

Index builder object that is associated with LinearIndex<K> type. The builder provides operations for manipulating linear indices (and the associated vectors).

Deedle.Internal

TypeDescription
ComparisonFailedException

An internal exception that is used to handle the case when comparison fails (even though the type implements IComparable and everything...)

ModuleDescription
Array

This module contains additional functions for working with arrays. Deedle.Internals is opened, it extends the standard Array module.

MissingValues

Utility functions for identifying missing values. The isNA function can be used to test whether a value represents a missing value - this includes the null value, Nullable<T> value with HasValue = false and Single.NaN as well as Double.NaN.

The functions in this module are not intended to be called directly.

ReadOnlyCollection

Provides helper functions for working with ReadOnlyCollection<T> similar to those in the Array module. Most importantly, F# 3.0 does not know that array implements IList<T>.

Seq

This module contains additional functions for working with sequences. Deedle.Internals is opened, it extends the standard Seq module.

Deedle.Keys

TypeDescription
CustomKey

Helper type that can be used to get ICustomKey for any object (including objects that actually implement the interface and tuples)

ICustomKey

Represents a special hierarchical key. This is mainly used in pretty printing (where we want to get parts of the keys based on levels. CustomKey.Get provides a way of getting ICustomKey.

SimpleLookup

Implements a simple lookup that matches any multi-level key against a specified array of optional objects (that represent missing/set parts of a key)

Deedle.Vectors

TypeDescription
IVectorBuilder

Represents an object that can construct vector values by processing the "mini-DSL" representation VectorConstruction.

IVectorValueTransform

Represent a transformation that is applied when combining two vectors (because we are combining untyped IVector values, the transformation is also untyped)

Vector

Type that provides access to creating vectors (represented as arrays)

VectorConstruction

A "mini-DSL" that describes construction of a vector. Vector can be constructed from various range operations (relocate, drop, slicing, appending), by combination of two vectors or by taking a vector from a list of variables.

Notably, vectors can only be constructed from other vectors of the same type (the Combine operation requires this - even though that one could be made more general). This is an intentional choice to make the representation simpler.

Logically, when we apply some index operation, we should get back a polymorphic vector construction (\forall T. VectorConstruction<T>) that can be applied to variuous different vector types. That would mean adding some more types, so we just model vector construction as an untyped operation and the typing is resquired by the Build method of the vector builder.

VectorData

Provides a way to get the data of an arbitrary vector. This is a concrete type used by functions that operate on vectors (like Series.sum, etc.). The vector may choose to return the data as ReadOnlyCollection (with or without N/A values) which is more efficient to use or as a lazy sequence (slower, but more general).

VectorFillMissing

Specifies how to fill missing values in a vector (when using the VectorConstruction.FillMissing command). This can only fill missing values using strategy that does not require access to index keys - either using constant or by propagating values.

VectorHole

Representes a "variable" in the mini-DSL below

VectorRange

Represents a range inside a vector

Deedle.Vectors.ArrayVector

TypeDescription
ArrayVector

Vector that stores data in an array. The data is stored using the ArrayVectorData<'T> type (discriminated union)

ArrayVectorBuilder

Implements a builder object (IVectorBuilder) for creating vectors of type ArrayVector<'T>. This includes operations such as appending, relocating values, creating vectors from arrays etc. The vector builder automatically switches between the two possible representations of the vector - when a missing value is present, it uses ArrayVectorData.VectorOptional, otherwise it uses ArrayVectorData.VectorNonOptional.

Fork me on GitHub