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
.
Example
For example, given index
, we can say:
// Create an index that excludes the value 42
let newIndex, vectorCmd = indexBuilder.DropItem(index, 42, VectorConstruction.Return(0))
// Now we can transform multiple vectors (e.g. all frame columns) using 'vectorCmd'
// (the integer '0' in `Return` is an offset in the array of vector arguments)
let newVector = vectorBuilder.Build(vectorCmd, [| vectorToTransform |])
Instance members
Instance member | Description |
iIndexBuilder.Aggregate(...)
Signature:(index:IIndex<'K> * aggregation:Aggregation<'K> * source:VectorConstruction * selector:(DataSegmentKind * SeriesConstruction<'K> -> 'TNewKey * OptionalValue<'R>)) -> IIndex<'TNewKey> * IVector<'R>
Modifiers: abstract Type parameters: 'K, 'TNewKey, 'R |
Aggregate an ordered index into floating windows or chunks. Parameters
|
iIndexBuilder.Append(arg1, arg2, arg3)
Signature:(SeriesConstruction<'K> * SeriesConstruction<'K> * IVectorValueTransform) -> IIndex<'K> * VectorConstruction
Modifiers: abstract Type parameters: 'K |
Append two indices and builds corresponding vector transformations
for both vectors that match the left and the right index. If the indices
are ordered, the ordering should be preserved (the keys should be aligned).
The specified |
iIndexBuilder.AsyncMaterialize(arg1)
Signature:SeriesConstruction<'K> -> AsyncSeriesConstruction<'K>
Modifiers: abstract Type parameters: 'K |
Given an index and vector construction, return a new index asynchronously
to allow composing evaluation of lazy series. The command to be applied to
vectors can be applied asynchronously using |
iIndexBuilder.Create(arg1, arg2)
Signature:(seq<'K> * Option<bool>) -> IIndex<'K>
Modifiers: abstract Type parameters: 'K |
Create a new index using the specified keys. Optionally, the caller can specify if the index keys are ordered or not. When the value is not set, the construction should check and infer this from the data. |
iIndexBuilder.DropItem(arg1, arg2)
Signature:(SeriesConstruction<'K> * 'K) -> SeriesConstruction<'K>
Modifiers: abstract Type parameters: 'K |
Drop an item associated with the specified key from the index. |
iIndexBuilder.GetRange(...)
Signature:(IIndex<'K> * ('K * BoundaryBehavior) option * ('K * BoundaryBehavior) option * VectorConstruction) -> SeriesConstruction<'K>
Modifiers: abstract Type parameters: 'K |
Create a new index that represents sub-range of an existing index. The range is specified
as a pair of options (when |
iIndexBuilder.GroupBy(...)
Signature:(IIndex<'K> * keySelector:('K -> OptionalValue<'TNewKey>) * VectorConstruction * valueSelector:('TNewKey * SeriesConstruction<'K> -> OptionalValue<'R>)) -> IIndex<'TNewKey> * IVector<'R>
Modifiers: abstract Type parameters: 'K, 'TNewKey, 'R |
Group a (possibly unordered) index using the specified |
iIndexBuilder.Intersect(arg1, arg2)
Signature:(SeriesConstruction<'K> * SeriesConstruction<'K>) -> IIndex<'K> * VectorConstruction * VectorConstruction
Modifiers: abstract Type parameters: 'K |
Creates an interesection of two indices and builds corresponding vector transformations for both vectors that match the left and the right index. |
iIndexBuilder.LookupLevel(arg1, arg2)
Signature:(SeriesConstruction<'K> * ICustomLookup<'K>) -> SeriesConstruction<'K>
Modifiers: abstract Type parameters: 'K |
Get items associated with the specified key from the index. This method takes
|
iIndexBuilder.OrderIndex(arg1)
Signature:SeriesConstruction<'K> -> SeriesConstruction<'K>
Modifiers: abstract Type parameters: 'K |
Order (possibly unordered) index and return transformation that reorders vector |
iIndexBuilder.Project(arg1)
Signature:IIndex<'K> -> IIndex<'K>
Modifiers: abstract Type parameters: 'K |
When we perform some projection on the vector (e.g. |
iIndexBuilder.Reindex(...)
Signature:(IIndex<'K> * IIndex<'K> * Lookup * VectorConstruction * (Address -> bool)) -> VectorConstruction
Modifiers: abstract Type parameters: 'K |
Given an old index and a new index, build a vector transformation that reorders
elements from a vector associated with the old index so that they match the new
index. When finding element location in the new index, the provided The proivded |
iIndexBuilder.Resample(...)
Signature:(IIndex<'K> * seq<'K> * Direction * source:VectorConstruction * valueSelector:('TNewKey * SeriesConstruction<'K> -> OptionalValue<'R>) * keySelector:('K * SeriesConstruction<'K> -> 'TNewKey)) -> IIndex<'TNewKey> * IVector<'R>
Modifiers: abstract Type parameters: 'K, 'TNewKey, 'R |
Aggregate data into non-overlapping chunks by aligning them to the
specified keys. The second parameter specifies the direction. If it is
|
iIndexBuilder.Union(arg1, arg2)
Signature:(SeriesConstruction<'K> * SeriesConstruction<'K>) -> IIndex<'K> * VectorConstruction * VectorConstruction
Modifiers: abstract Type parameters: 'K |
Creates a union of two indices and builds corresponding vector transformations for both vectors that match the left and the right index. |
iIndexBuilder.WithIndex(...)
Signature:(IIndex<'K> * (Address -> OptionalValue<'TNewKey>) * VectorConstruction) -> SeriesConstruction<'TNewKey>
Modifiers: abstract Type parameters: 'K, 'TNewKey |
Create a new index by picking a new key value for each key in the original index (used e.g. when we have a frame and want to use specified column as a new index). |