Click or drag to resize
SeriesK, V Class
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 [category:Core frame and series types]
Inheritance Hierarchy

Namespace:  Deedle
Assembly:  Deedle (in Deedle.dll) Version: 1.2
Syntax
C#
[SerializableAttribute]
public class Series<K, V> : ISeries<K>

Type Parameters

K
V

The SeriesK, V type exposes the following members.

Constructors
  NameDescription
Public methodSeriesK, V(IEnumerableKeyValuePairK, V)
Initializes a new instance of the SeriesK, V class
Public methodSeriesK, V(IEnumerableK, IEnumerableV)
Initializes a new instance of the SeriesK, V class
Public methodSeriesK, V(K, V)
Initializes a new instance of the SeriesK, V class
Public methodSeriesK, V(IIndexK, IVectorV, IVectorBuilder, IIndexBuilder)
Initializes a new instance of the SeriesK, V class
Top
Properties
  NameDescription
Public propertyIndex
Returns the index associated with this series. This member should not generally be accessed directly, because all functionality is exposed through series operations. [category:Series data]
Public propertyIsEmpty
[category:Series data]
Public propertyIsOrdered
[category:Series data]
Public propertyItemIEnumerableK
[category:Accessors and slicing]
Public propertyItemK
[category:Accessors and slicing]
Public propertyItemICustomLookupK
[category:Accessors and slicing]
Public propertyKeyCount
Returns the total number of keys in the specified series. This returns the total length of the series, including keys for which there is no value available. [category:Series data]
Public propertyKeyRange
[category:Series data]
Public propertyKeys
Returns a collection of keys that are defined by the index of this series. Note that the length of this sequence does not match the `Values` sequence if there are missing values. To get matching sequence, use the `Observations` property or `Series.observation`. [category:Series data]
Public propertyObservations
Returns a collection of observations that form this series. Note that this property skips over all missing (or NaN) values. Observations are returned as `KeyValuePair<K, V>` objects. For an F# alternative that uses tuples, see `Series.observations`. [category:Series data]
Public propertyObservationsAll
Returns a collection of observations that form this series. Note that this property includes all missing (or NaN) values. Observations are returned as `KeyValuePair<K, OptionalValue<V>>` objects. For an F# alternative that uses tuples, see `Series.observationsAll`. [category:Series data]
Public propertyReversed
[category:Projection and filtering]
Public propertyValueCount
Returns the total number of values in the specified series. This excludes missing values or not available values (such as values created from `null`, `Double.NaN`, or those that are missing due to outer join etc.). [category:Series data]
Public propertyValues
Returns a collection of values that are available in the series data. Note that the length of this sequence does not match the `Keys` sequence if there are missing values. To get matching sequence, use the `Observations` property or `Series.observation`. [category:Series data]
Public propertyValuesAll
Returns a collection of values, including possibly missing values. Note that the length of this sequence matches the `Keys` sequence. [category:Series data]
Public propertyVector
Returns the vector associated with this series. This member should not generally be accessed directly, because all functionality is exposed through series operations. [category:Series data]
Top
Methods
  NameDescription
Public methodStatic memberAbs(SeriesK, Double)
[category:Operators]
Public methodStatic memberAbs(SeriesK, Int32)
[category:Operators]
Public methodStatic memberAcos
[category:Operators]
Public methodAfter
Public methodAggregateTNewKey, R(AggregationK, FuncDataSegmentSeriesK, V, KeyValuePairTNewKey, OptionalValueR)
Aggregates an ordered series using the method specified by `Aggregation<K>` and then applies the provided `observationSelector` on each window or chunk to produce the result which is returned as a new series. The selector returns both the key and the value. ## Parameters - `aggregation` - Specifies the aggregation method using `Aggregation<K>`. This is a discriminated union listing various chunking and windowing conditions. - `observationSelector` - A function that is called on each chunk to obtain a key and a value. [category:Windowing, chunking and grouping]
Public methodAggregateTNewKey, R(AggregationK, FuncDataSegmentSeriesK, V, TNewKey, FuncDataSegmentSeriesK, V, OptionalValueR)
Aggregates an ordered series using the method specified by `Aggregation<K>` and then applies the provided `valueSelector` on each window or chunk to produce the result which is returned as a new series. A key for each window or chunk is selected using the specified `keySelector`. ## Parameters - `aggregation` - Specifies the aggregation method using `Aggregation<K>`. This is a discriminated union listing various chunking and windowing conditions. - `keySelector` - A function that is called on each chunk to obtain a key. - `valueSelector` - A value selector function that is called to aggregate each chunk or window. [category:Windowing, chunking and grouping]
Public methodStatic memberAsin
[category:Operators]
Public methodAsyncMaterialize
Public methodStatic memberAtan
[category:Operators]
Public methodBefore
Public methodBetween
Public methodStatic memberCeiling
[category:Operators]
Public methodConvertR
[category:Projection and filtering]
Public methodStatic memberCos
[category:Operators]
Public methodStatic memberCosh
[category:Operators]
Public methodEndAt
Public methodEquals (Overrides ObjectEquals(Object).)
Public methodStatic memberExp
[category:Operators]
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodStatic memberFloor
[category:Operators]
Public methodFormat
Shows the series content in a human-readable format. The resulting string shows a limited number of values from the series.
Public methodFormat(Int32)
Shows the series content in a human-readable format. The resulting string shows a limited number of values from the series. ## Parameters - `itemCount` - The total number of items to show. The result will show at most `itemCount/2` items at the beginning and ending of the series.
Public methodFormat(Int32, Int32)
Shows the series content in a human-readable format. The resulting string shows a limited number of values from the series. ## Parameters - `startCount` - The number of elements to show at the beginning of the series - `endCount` - The number of elements to show at the end of the series
Public methodGet(K)
[category:Accessors and slicing]
Public methodGet(K, Lookup)
[category:Accessors and slicing]
Public methodGetAddressRange
Internal helper used by `skip`, `take`, etc.
Public methodGetAt
[category:Accessors and slicing]
Public methodGetByLevel
[category:Accessors and slicing]
Public methodGetHashCode (Overrides ObjectGetHashCode.)
Public methodGetItems(IEnumerableK)
Returns a new series with an index containing the specified keys. When the key is not found in the current series, the newly returned series will contain a missing value. When the second parameter is not specified, the keys have to exactly match the keys in the current series (`Lookup.Exact`). ## Parameters * `keys` - A collection of keys in the current series. [category:Accessors and slicing]
Public methodGetItems(IEnumerableK, Lookup)
Returns a new series with an index containing the specified keys. When the key is not found in the current series, the newly returned series will contain a missing value. When the second parameter is not specified, the keys have to exactly match the keys in the current series (`Lookup.Exact`). ## Parameters * `keys` - A collection of keys in the current series. * `lookup` - Specifies the lookup behavior when searching for keys in the current series. `Lookup.NearestGreater` and `Lookup.NearestSmaller` can be used when the current series is ordered. [category:Accessors and slicing]
Public methodGetKeyAt
[category:Accessors and slicing]
Public methodGetObservation(K)
[category:Accessors and slicing]
Public methodGetObservation(K, Lookup)
[category:Accessors and slicing]
Public methodGetSlice
[category:Accessors and slicing]
Public methodGetSubrange
[category:Accessors and slicing]
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGroupByTNewKey
Groups a series (ordered or unordered) using the specified key selector (`keySelector`) ## Parameters - `keySelector` - Generates a new key that is used for aggregation, based on the original key and value. The new key must support equality testing. [category:Windowing, chunking and grouping]
Public methodIndexOrdinally
Replace the index of the series with ordinally generated integers starting from zero. The elements of the series are assigned index according to the current order, or in a non-deterministic way, if the current index is not ordered. [category:Indexing]
Public methodIndexWithTNewKey
[category:Indexing]
Public methodInterpolate
Interpolates an ordered series given a new sequence of keys. The function iterates through each new key, and invokes a function on the current key, the nearest smaller and larger valid observations from the series argument. The function must return a new valid float. ## Parameters - `keys` - Sequence of new keys that forms the index of interpolated results - `f` - Function to do the interpolating [category:Windowing, chunking and grouping]
Public methodStatic memberLog
[category:Operators]
Public methodStatic memberLog10
[category:Operators]
Public methodMaterialize
Public methodMaterializeAsync
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodMerge(SeriesK, V)
[category:Merging, joining and zipping]
Public methodMerge(SeriesK, V)
[category:Merging, joining and zipping]
Public methodMerge(IEnumerableSeriesK, V)
[category:Merging, joining and zipping]
Public methodMerge(SeriesK, V, UnionBehavior)
[category:Merging, joining and zipping]
Public methodPairwise
Returns a series containing the predecessor and an element for each input, except for the first one. The returned series is one key shorter (it does not contain a value for the first key). ## Parameters - `series` - The input series to be aggregated. ## Example let input = series [ 1 => 'a'; 2 => 'b'; 3 => 'c'] let res = input.Pairwise() res = series [2 => ('a', 'b'); 3 => ('b', 'c') ] [category:Windowing, chunking and grouping]
Public methodPairwise(Boundary)
Returns a series containing an element and its neighbor for each input. The returned series is one key shorter (it does not contain a value for the first or last key depending on `boundary`). If `boundary` is other than `Boundary.Skip`, then the key is included in the returned series, but its value is missing. ## Parameters - `series` - The input series to be aggregated. - `boundary` - Specifies the direction in which the series is aggregated and how the corner case is handled. If the value is `Boundary.AtEnding`, then the function returns value and its successor, otherwise it returns value and its predecessor. ## Example let input = series [ 1 => 'a'; 2 => 'b'; 3 => 'c'] let res = input.Pairwise() res = series [2 => ('a', 'b'); 3 => ('b', 'c') ] [category:Windowing, chunking and grouping]
Public methodStatic memberPow(Double, SeriesK, Double)
[category:Operators]
Public methodStatic memberPow(SeriesK, Double, SeriesK, Double)
[category:Operators]
Public methodStatic memberPow(SeriesK, Double, Double)
[category:Operators]
Public methodRealign
[category:Indexing]
Public methodResample(IEnumerableK, Direction)
Resample the series based on a provided collection of keys. The values of the series are aggregated into chunks based on the specified keys. Depending on `direction`, the specified key is either used as the smallest or as the greatest key of the chunk (with the exception of boundaries that are added to the first/last chunk). The chunks are then returned as a nested series. ## Parameters - `keys` - A collection of keys to be used for resampling of the series - `direction` - If this parameter is `Direction.Forward`, then each key is used as the smallest key in a chunk; for `Direction.Backward`, the keys are used as the greatest keys in a chunk. ## Remarks This operation is only supported on ordered series. The method throws `InvalidOperationException` when the series is not ordered. [category:Resampling]
Public methodResamplea(IEnumerableK, Direction, FuncK, SeriesK, V, a)
Resample the series based on a provided collection of keys. The values of the series are aggregated into chunks based on the specified keys. Depending on `direction`, the specified key is either used as the smallest or as the greatest key of the chunk (with the exception of boundaries that are added to the first/last chunk). Such chunks are then aggregated using the provided `valueSelector` and `keySelector` (an overload that does not take `keySelector` just selects the explicitly provided key). ## Parameters - `keys` - A collection of keys to be used for resampling of the series - `direction` - If this parameter is `Direction.Forward`, then each key is used as the smallest key in a chunk; for `Direction.Backward`, the keys are used as the greatest keys in a chunk. - `valueSelector` - A function that is used to collapse a generated chunk into a single value. Note that this function may be called with empty series. ## Remarks This operation is only supported on ordered series. The method throws `InvalidOperationException` when the series is not ordered. [category:Resampling]
Public methodResampleTNewKey, R(IEnumerableK, Direction, FuncTNewKey, SeriesK, V, R, FuncK, SeriesK, V, TNewKey)
Resample the series based on a provided collection of keys. The values of the series are aggregated into chunks based on the specified keys. Depending on `direction`, the specified key is either used as the smallest or as the greatest key of the chunk (with the exception of boundaries that are added to the first/last chunk). Such chunks are then aggregated using the provided `valueSelector` and `keySelector` (an overload that does not take `keySelector` just selects the explicitly provided key). ## Parameters - `keys` - A collection of keys to be used for resampling of the series - `direction` - If this parameter is `Direction.Forward`, then each key is used as the smallest key in a chunk; for `Direction.Backward`, the keys are used as the greatest keys in a chunk. - `valueSelector` - A function that is used to collapse a generated chunk into a single value. Note that this function may be called with empty series. - `keySelector` - A function that is used to generate a new key for each chunk. ## Remarks This operation is only supported on ordered series. The method throws `InvalidOperationException` when the series is not ordered. [category:Resampling]
Public methodStatic memberRound
[category:Operators]
Public methodScanAllValuesS
[category:Projection and filtering]
Public methodScanValuesS
[category:Projection and filtering]
Public methodSelectR(FuncKeyValuePairK, V, R)
[category:Projection and filtering]
Public methodSelectR(FuncKeyValuePairK, V, Int32, R)
[category:Projection and filtering]
Public methodSelectKeysR
[category:Projection and filtering]
Public methodSelectOptionalR
[category:Projection and filtering]
Public methodSelectValuesT
[category:Projection and filtering]
Public methodStatic memberSign
[category:Operators]
Public methodStatic memberSin
[category:Operators]
Public methodStatic memberSinh
[category:Operators]
Public methodStatic memberSqrt
[category:Operators]
Public methodStartAt
Public methodStatic memberTan
[category:Operators]
Public methodStatic memberTanh
[category:Operators]
Public methodToString (Overrides ObjectToString.)
Public methodStatic memberTruncate
[category:Operators]
Public methodTryGet(K)
[category:Accessors and slicing]
Public methodTryGet(K, Lookup)
[category:Accessors and slicing]
Public methodTryGetAt
[category:Accessors and slicing]
Public methodTryGetObservation(K)
Attempts to get a value at the specified 'key' [category:Accessors and slicing]
Public methodTryGetObservation(K, Lookup)
[category:Accessors and slicing]
Public methodWhere(FuncKeyValuePairK, V, Boolean)
[category:Projection and filtering]
Public methodWhere(FuncKeyValuePairK, V, Int32, Boolean)
[category:Projection and filtering]
Public methodWhereOptional
[category:Projection and filtering]
Public methodWithMissingFroma
Returns the current series with the same index but with values missing wherever the corresponding key exists in the other series index with an associated missing value. [category:Projection and filtering]
Public methodZipV2(SeriesK, V2)
[category:Merging, joining and zipping]
Public methodZipV2(SeriesK, V2, JoinKind)
[category:Merging, joining and zipping]
Public methodZipV2(SeriesK, V2, JoinKind, Lookup)
[category:Merging, joining and zipping]
Public methodZipInnerV2
[category:Merging, joining and zipping]
Top
Operators
  NameDescription
Public operatorStatic memberAddition(Double, SeriesK, Double)
[category:Operators]
Public operatorStatic memberAddition(Int32, SeriesK, Int32)
[category:Operators]
Public operatorStatic memberAddition(SeriesK, Double, SeriesK, Double)
[category:Operators]
Public operatorStatic memberAddition(SeriesK, Double, Double)
[category:Operators]
Public operatorStatic memberAddition(SeriesK, Int32, SeriesK, Int32)
[category:Operators]
Public operatorStatic memberAddition(SeriesK, Int32, Int32)
[category:Operators]
Public operatorStatic memberDivision(Double, SeriesK, Double)
[category:Operators]
Public operatorStatic memberDivision(Int32, SeriesK, Int32)
[category:Operators]
Public operatorStatic memberDivision(SeriesK, Double, SeriesK, Double)
[category:Operators]
Public operatorStatic memberDivision(SeriesK, Double, Double)
[category:Operators]
Public operatorStatic memberDivision(SeriesK, Int32, SeriesK, Int32)
[category:Operators]
Public operatorStatic memberDivision(SeriesK, Int32, Int32)
[category:Operators]
Public operatorStatic memberDollara
Custom operator that can be used for applying a function to all elements of a series. This provides a nicer syntactic sugar for the `Series.mapValues` function. For example: // Given a float series and a function on floats let s1 = Series.ofValues [ 1.0 .. 10.0 ] let adjust v = max 10.0 v // Apply "adjust (v + v)" to all elements adjust $ (s1 + s1)
Public operatorStatic memberDynamica
[category:Accessors and slicing]
Public operatorStatic memberMultiply(Double, SeriesK, Double)
[category:Operators]
Public operatorStatic memberMultiply(Int32, SeriesK, Int32)
[category:Operators]
Public operatorStatic memberMultiply(SeriesK, Double, SeriesK, Double)
[category:Operators]
Public operatorStatic memberMultiply(SeriesK, Double, Double)
[category:Operators]
Public operatorStatic memberMultiply(SeriesK, Int32, SeriesK, Int32)
[category:Operators]
Public operatorStatic memberMultiply(SeriesK, Int32, Int32)
[category:Operators]
Public operatorStatic memberSubtraction(Double, SeriesK, Double)
[category:Operators]
Public operatorStatic memberSubtraction(Int32, SeriesK, Int32)
[category:Operators]
Public operatorStatic memberSubtraction(SeriesK, Double, SeriesK, Double)
[category:Operators]
Public operatorStatic memberSubtraction(SeriesK, Double, Double)
[category:Operators]
Public operatorStatic memberSubtraction(SeriesK, Int32, SeriesK, Int32)
[category:Operators]
Public operatorStatic memberSubtraction(SeriesK, Int32, Int32)
[category:Operators]
Public operatorStatic memberUnaryNegation(SeriesK, Double)
[category:Operators]
Public operatorStatic memberUnaryNegation(SeriesK, Int32)
[category:Operators]
Top
See Also