Series
Namespace: Deedle
The Series
module provides an F#-friendly API for working with data and time series.
The API follows the usual design for collection-processing in F#, so the functions work
well with the pipelining (|>
) operator. For example, given a series with ages,
we can use Series.filterValues
to filter outliers and then Stats.mean
to calculate
the mean:
1: 2: 3: |
|
The module provides comprehensive set of functions for working with series. The same API is also exposed using C#-friendly extension methods. In C#, the above snippet could be written as:
1: 2: 3: |
|
For more information about similar frame-manipulation functions, see the Frame
module.
For more information about C#-friendly extensions, see SeriesExtensions
. The functions
in the Series
module are grouped in a number of categories and documented below.
Table of contents
- Accessing series data and lookup
- Grouping, windowing and chunking
- Hierarchical index operations
- Joining, merging and zipping
- Missing values
- Processing series with exceptions
- Sampling, resampling and advanced lookup
- Series transformations
- Sorting and index manipulation
- Other module members
Accessing series data and lookup
Functions in this category provide access to the values in the series.
- The term observation is used for a key value pair in the series.
- When working with a sorted series, it is possible to perform lookup using keys that are not present in the series - you can specify to search for the previous or next available value using lookup behavior.
- Functions such as
get
andgetAll
have their counterpartslookup
andlookupAll
that let you specify lookup behavior. - For most of the functions that may fail, there is a
try[Foo]
variant that returnsNone
instead of failing. - Functions with a name ending with
At
perform lookup based on the absolute integer offset (and ignore the keys of the series)
Functions and values
Grouping, windowing and chunking
This category includes functions that group data from a series in some way. Two key concepts here are window and chunk. Window refers to (overlapping) sliding windows over the input series while chunk refers to non-overlapping blocks of the series.
The boundary behavior can be specified using the Boundary
flags. The value
Skip
means that boundaries (incomplete windows or chunks) should be skipped. The value
AtBeginning
and AtEnding
can be used to define at which side should the boundary be
returned (or skipped). For chunking, AtBeginning ||| Skip
makes sense and it means that
the incomplete chunk at the beginning should be skipped (aligning the last chunk with the end).
The behavior may be specified in a number of ways (which is reflected in the name):
- dist
- using an absolute distance between the keys
- while
- using a condition on the first and last key
- size
- by specifying the absolute size of the window/chunk
The functions ending with Into
take a function to be applied to the window/chunk.
The functions window
, windowInto
and chunk
, chunkInto
are simplified versions
that take a size. There is also pairwise
function for sliding window of size two.
Functions and values
Hierarchical index operations
When the key of a series is tuple, the elements of the tuple can be treated
as multiple levels of a index. For example Series<'K1 * 'K2, 'V>
has two
levels with keys of types 'K1
and 'K2
respectively.
The functions in this cateogry provide a way for aggregating values in the
series at one of the levels. For example, given a series input
indexed by
two-element tuple, you can calculate mean for different first-level values as
follows:
1:
|
|
Note that the Stats
module provides helpers for typical statistical operations,
so the above could be written just as input |> Stats.levelMean fst
.
Full name: Microsoft.FSharp.Core.Operators.fst
Functions and values
Function or value | Description |
applyLevel level op series
Signature: level:('K1 -> 'K2) -> op:(Series<'K1,'V> -> 'R) -> series:Series<'K1,'V> -> Series<'K2,'R>
Type parameters: 'K1, 'K2, 'V, 'R |
Groups the elements of the input series in groups based on the keys
produced by This operation is designed to be used with hierarchical indexing. Parameters
|
applyLevelOptional level op series
Signature: level:('K1 -> 'K2) -> op:(Series<'K1,'V> -> 'R option) -> series:Series<'K1,'V> -> Series<'K2,'R>
Type parameters: 'K1, 'K2, 'V, 'R |
Groups the elements of the input series in groups based on the keys
produced by This operation is designed to be used with hierarchical indexing. Parameters
|
reduceLevel level op series
Signature: level:('K1 -> 'K2) -> op:('T -> 'T -> 'T) -> series:Series<'K1,'T> -> Series<'K2,'T>
Type parameters: 'K1, 'K2, 'T |
Groups the elements of the input series in groups based on the keys
produced by This operation is designed to be used with hierarchical indexing. Parameters
|
Joining, merging and zipping
Given two series, there are two ways to combine the values. If the keys in the series
are not overlapping (or you want to throw away values from one or the other series),
then you can use merge
or mergeUsing
. To merge more than 2 series efficiently, use
the mergeAll
function, which has been optimized for large number of series.
If you want to align two series, you can use the zipping operation. This aligns
two series based on their keys and gives you tuples of values. The default behavior
(zip
) uses outer join and exact matching. For ordered series, you can specify
other forms of key lookups (e.g. find the greatest smaller key) using zipAlign
.
functions ending with Into
are generally easier to use as they call a specified
function to turn the tuple (of possibly missing values) into a new value.
For more complicated behaviors, it is often convenient to use joins on frames instead of working with series. Create two frames with single columns and then use the join operation. The result will be a frame with two columns (which is easier to use than series of tuples).
Functions and values
Function or value | Description |
merge series1 series2
Signature: series1:Series<'K,'V> -> series2:Series<'K,'V> -> Series<'K,'V>
Type parameters: 'K, 'V |
Merge two series with distinct keys. When the same key with a value occurs in both
series, an exception is thrown. In that case, you can use |
mergeAll series
Signature: series:seq<Series<'K,'V>> -> Series<'K,'V>
Type parameters: 'K, 'V |
Merge multiple series with distinct keys. When the same key with a value occurs in two of the series, an exception is thrown. This function is efficient even when the number of series to be merged is large. |
mergeUsing behavior series1 series2
Signature: behavior:UnionBehavior -> series1:Series<'K,'V> -> series2:Series<'K,'V> -> Series<'K,'V>
Type parameters: 'K, 'V |
Merge two series with possibly overlapping keys. The Parameters
|
zip series1 series2
Signature: series1:Series<'K,'V1> -> series2:Series<'K,'V2> -> Series<'K,('V1 opt * 'V2 opt)>
Type parameters: 'K, 'V1, 'V2 |
Align and zip two series using outer join and exact key matching. The function returns a series of tuples where both elements may be missing. As a result, it is often easier to use join on frames instead. |
zipAlign kind lookup series1 series2
Signature: kind:JoinKind -> lookup:Lookup -> series1:Series<'K,'V1> -> series2:Series<'K,'V2> -> Series<'K,('V1 opt * 'V2 opt)>
Type parameters: 'K, 'V1, 'V2 |
Align and zip two series using the specified joining mechanism and key matching. The function returns a series of tuples where both elements may be missing. As a result, it is often easier to use join on frames instead. Parameters
|
zipAlignInto (...)
Signature: kind:JoinKind -> lookup:Lookup -> op:('V1 option -> 'V2 option -> 'R option) -> series1:Series<'K,'V1> -> series2:Series<'K,'V2> -> Series<'K,'R>
Type parameters: 'V1, 'V2, 'R, 'K |
Align and zip two series using the specified joining mechanism and key matching.
The function calls the specified function Parameters
|
zipInner series1 series2
Signature: series1:Series<'K,'V1> -> series2:Series<'K,'V2> -> Series<'K,('V1 * 'V2)>
Type parameters: 'K, 'V1, 'V2 |
Align and zip two series using inner join and exact key matching. The function returns a series of tuples with values from the two series. |
zipInto op series1 series2
Signature: op:('V1 -> 'V2 -> 'R) -> series1:Series<'K,'V1> -> series2:Series<'K,'V2> -> Series<'K,'R>
Type parameters: 'V1, 'V2, 'R, 'K |
Align and zip two series using inner join and exact key matching (use Parameters
|
Missing values
This group of functions provides a way of working with missing values in a series.
The dropMissing
function drops all keys for which there are no values in the series.
The withMissingFrom
function lets you copy missing values from another series.
The remaining functions provide different mechanism for filling the missing values.
fillMissingWith
fills missing values with a specified constantfillMissingUsing
calls a specified function for every missing valuefillMissing
and variants propagates values from previous/later keys
Functions and values
Function or value | Description | ||
dropMissing series
Signature: series:Series<'K,'T> -> Series<'K,'T>
Type parameters: 'K, 'T |
Drop missing values from the specified series. The returned series contains only those keys for which there is a value available in the original one. Parameters
Example
val s : obj
Full name: docs.s Multiple items
val int : value:'T -> int (requires member op_Explicit) Full name: Microsoft.FSharp.Core.Operators.int -------------------- type int = int32 Full name: Microsoft.FSharp.Core.int -------------------- type int<'Measure> = int Full name: Microsoft.FSharp.Core.int<_> Multiple items
val float : value:'T -> float (requires member op_Explicit) Full name: Microsoft.FSharp.Core.Operators.float -------------------- type float = System.Double Full name: Microsoft.FSharp.Core.float -------------------- type float<'Measure> = float Full name: Microsoft.FSharp.Core.float<_> |
||
fillMissing direction series
Signature: direction:Direction -> series:Series<'K,'T> -> Series<'K,'T>
Type parameters: 'K, 'T |
Fill missing values in the series with the nearest available value (using the specified direction). Note that the series may still contain missing values after call to this function. This operation can only be used on ordered series. Parameters
Example
val sample : obj
Full name: docs.sample |
||
fillMissingBetween (...)
Signature: (startKey:'K * endKey:'K) -> direction:Direction -> series:Series<'K,'T> -> Series<'K,'T>
Type parameters: 'K, 'T |
Fill missing values only between Parameters
|
||
fillMissingInside direction series
Signature: direction:Direction -> series:Series<'K,'T> -> Series<'K,'T>
Type parameters: 'K, 'T |
Fill missing values only between the first and last non-missing values. |
||
fillMissingUsing f series
Signature: f:('K -> 'T) -> series:Series<'K,'T> -> Series<'K,'T>
Type parameters: 'K, 'T |
Fill missing values in the series using the specified function. The specified function is called with all keys for which the series does not contain value and the result of the call is used in place of the missing value. Parameters
RemarksThis function can be used to implement more complex interpolation. For example see handling missing values in the tutorial |
||
fillMissingWith value series
Signature: value:'?494728 -> series:Series<'K,'T> -> Series<'K,'T>
Type parameters: '?494728, 'K, 'T |
Fill missing values in the series with a constant value. Parameters
|
||
withMissingFrom other series
Signature: other:Series<'K,'S> -> series:Series<'K,'T> -> Series<'K,'T>
Type parameters: 'K, 'S, 'T |
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. |
Processing series with exceptions
The functions in this group can be used to write computations over series that may fail.
They use the type tryval<'T>
which is defined as a discriminated union:
1: 2: 3: |
|
The function tryMap
lets you create Series<'K, tryval<'T>>
by mapping over values
of an original series. You can then extract values using tryValues
, which throws
AggregateException
if there were any errors. Functions tryErrors
and trySuccesses
give series containing only errors and successes. You can fill failed values with
a constant using fillErrorsWith
.
| Success of 'T
| Error of exn
Full name: docs.tryval<_>
Full name: Microsoft.FSharp.Core.exn
Functions and values
Function or value | Description |
fillErrorsWith value series
Signature: value:'T -> series:Series<'K,'T tryval> -> Series<'K,'T>
Type parameters: 'T, 'K |
Givnen a series of |
tryErrors series
Signature: series:Series<'K,'V tryval> -> Series<'K,exn>
Type parameters: 'K, 'V |
Given a series of |
tryMap f series
Signature: f:('K -> 'T -> 'R) -> series:Series<'K,'T> -> Series<'K,'R tryval>
Type parameters: 'K, 'T, 'R |
Returns a new series by applying the specified transformation to all values
of the input series. The result contains |
trySuccesses series
Signature: series:Series<'K,'V tryval> -> Series<'K,'V>
Type parameters: 'K, 'V |
Given a series of |
tryValues series
Signature: series:Series<'K,'T tryval> -> Series<'K,'T>
Type parameters: 'K, 'T |
Obtains values from a series of |
Sampling, resampling and advanced lookup
Given a (typically) time series sampling or resampling makes it possible to get time series with representative values at lower or uniform frequency. We use the following terminology:
lookup
andsample
functions find values at specified key; if a key is not available, they can look for value associated with the nearest smaller or the nearest greater key.resample
function aggregate values values into chunks based on a specified collection of keys (e.g. explicitly provided times), or based on some relation between keys (e.g. date times having the same date).resampleUniform
is similar to resampling, but we specify keys by providing functions that generate a uniform sequence of keys (e.g. days), the operation also fills value for days that have no corresponding observations in the input sequence.
Functions and values
Function or value | Description |
lookupTime interval dir lookup series
Signature: interval:TimeSpan -> dir:Direction -> lookup:Lookup -> series:Series<^K,^V> -> Series<^K,^V>
Type parameters: ^K, ^V |
Finds values at, or near, the specified times in a given series. The operation generates
keys starting from the smallest key of the original series, using the specified Parameters
RemarksThis operation is only supported on ordered series. The method throws
|
lookupTimeAt (...)
Signature: start:^K -> interval:TimeSpan -> dir:Direction -> lookup:Lookup -> series:Series<^K,^V> -> Series<^K,^V>
Type parameters: ^K, ^V |
Finds values at, or near, the specified times in a given series. The operation generates
keys starting at the specified Parameters
RemarksThis operation is only supported on ordered series. The method throws
|
resample keys dir series
Signature: keys:seq<'K> -> dir:Direction -> series:Series<'K,'V> -> Series<'K,Series<'K,'V>>
Type parameters: 'K, 'V |
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 Parameters
RemarksThis operation is only supported on ordered series. The method throws
|
resampleEquiv keyProj series
Signature: keyProj:('K1 -> 'K2) -> series:Series<'K1,'V1> -> Series<'K2,Series<'K1,'V1>>
Type parameters: 'K1, 'K2, 'V1 |
Resample the series based on equivalence class on the keys. A specified function
Parameters
RemarksThis function is similar to This operation is only supported on ordered series. The method throws
|
resampleEquivInto keyProj f series
Signature: keyProj:('K1 -> 'K2) -> f:(Series<'K1,'V1> -> 'V2) -> series:Series<'K1,'V1> -> Series<'K2,'V2>
Type parameters: 'K1, 'K2, 'V1, 'V2 |
Resample the series based on equivalence class on the keys. A specified function
Parameters
RemarksThis function is similar to This operation is only supported on ordered series. The method throws
|
resampleInto keys dir f series
Signature: keys:seq<'K> -> dir:Direction -> f:('K -> Series<'K,'V> -> '?494776) -> series:Series<'K,'V> -> Series<'K,'?494776>
Type parameters: 'K, 'V, '?494776 |
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 Parameters
RemarksThis operation is only supported on ordered series. The method throws
|
resampleUniform (...)
Signature: fillMode:Lookup -> keyProj:('K1 -> 'K2) -> nextKey:('K2 -> 'K2) -> series:Series<'K1,'V> -> Series<'K2,Series<'K1,'V>>
Type parameters: 'K1, 'K2, 'V |
Resample the series based on equivalence class on the keys and also generate values
for all keys of the target space that are between the minimal and maximal key of the
specified series (e.g. generate value for all days in the range covered by the series).
A specified function When there are no values for a (generated) key, then the function behaves according to
Parameters
RemarksThis operation is only supported on ordered series. The method throws
|
resampleUniformInto (...)
Signature: fillMode:Lookup -> keyProj:('K1 -> 'K2) -> nextKey:('K2 -> 'K2) -> f:(Series<'K1,'V> -> '?494793) -> series:Series<'K1,'V> -> Series<'K2,'?494793>
Type parameters: 'K1, 'K2, 'V, '?494793 |
Resample the series based on equivalence class on the keys and also generate values
for all keys of the target space that are between the minimal and maximal key of the
specified series (e.g. generate value for all days in the range covered by the series).
A specified function When there are no values for a (generated) key, then the function behaves according to
Parameters
RemarksThis operation is only supported on ordered series. The method throws
|
sampleTime interval dir series
Signature: interval:TimeSpan -> dir:Direction -> series:Series<^?494807,^?494808> -> Series<^?494807,Series<^?494807,^?494808>>
Type parameters: ^?494807, ^?494808 |
Performs sampling by time and returns chunks obtained by time-sampling as a nested Parameters
RemarksThis operation is only supported on ordered series. The method throws
|
sampleTimeAt start interval dir series
Signature: start:^?494810 -> interval:TimeSpan -> dir:Direction -> series:Series<^?494810,^?494811> -> Series<^?494810,Series<^?494810,^?494811>>
Type parameters: ^?494810, ^?494811 |
Performs sampling by time and returns chunks obtained by time-sampling as a nested Parameters
RemarksThis operation is only supported on ordered series. The method throws
|
sampleTimeAtInto (...)
Signature: start:^K -> interval:TimeSpan -> dir:Direction -> f:(Series<^K,^V> -> '?494805) -> series:Series<^K,^V> -> Series<^K,'?494805>
Type parameters: ^K, ^V, '?494805 |
Performs sampling by time and aggregates chunks obtained by time-sampling into a single
value using a specified function. The operation generates keys starting at the given
Parameters
RemarksThis operation is only supported on ordered series. The method throws
|
sampleTimeInto interval dir f series
Signature: interval:TimeSpan -> dir:Direction -> f:(Series<^K,^V> -> '?494801) -> series:Series<^K,^V> -> Series<^K,'?494801>
Type parameters: ^K, ^V, '?494801 |
Performs sampling by time and aggregates chunks obtained by time-sampling into a single
value using a specified function. The operation generates keys starting at the first
key in the source series, using the specified Parameters
RemarksThis operation is only supported on ordered series. The method throws
|
Series transformations
Functions in this category perform standard transformations on series including projections, filtering, taking some sub-series of the series, aggregating values using scanning and so on.
Projection and filtering functions generally skip over missing values, but there
are variants filterAll
and mapAll
that let you handle missing values explicitly.
Keys can be transformed using mapKeys
. When you do not need to consider the keys,
and only care about values, use filterValues
and mapValues
(which is also aliased
as the $
operator).
Series supports standard set of folding functions including reduce
and fold
(to
reduce series values into a single value) as well as the scan[All]
function, which
can be used to fold values of a series into a series of intermeidate folding results.
The functions take[Last]
and skip[Last]
can be used to take a sub-series of the
original source series by skipping a specified number of elements. Note that this
does not require an ordered series and it ignores the index - for index-based lookup
use slicing, such as series.[lo .. hi]
, instead.
Finally the shift
function can be used to obtain a series with values shifted by
the specified offset. This can be used e.g. to get previous value for each key using
Series.shift 1 ts
. The diff
function calculates difference from previous value using
ts - (Series.shift offs ts)
.
Functions and values
Function or value | Description | ||
diff offset series
Signature: offset:int -> series:Series<'K,^T> -> Series<'K,^T>
Type parameters: 'K, ^T |
Returns a series containing difference between a value in the original series and
a value at the specified offset. For example, calling
Parameters
|
||
filter f series
Signature: f:('K -> 'T -> bool) -> series:Series<'K,'T> -> Series<'K,'T>
Type parameters: 'K, 'T |
Returns a new series containing only the elements for which the specified predicate
returns |
||
filterAll f series
Signature: f:('K -> 'T option -> bool) -> series:Series<'K,'T> -> Series<'K,'T>
Type parameters: 'K, 'T |
Returns a new series containing only the elements for which the specified predicate
returns |
||
filterValues f series
Signature: f:('T -> bool) -> series:Series<'K,'T> -> Series<'K,'T>
Type parameters: 'T, 'K |
Returns a new series containing only the elements for which the specified predicate
returns |
||
flatten series
Signature: series:Series<'K,'T option> -> Series<'K,'T>
Type parameters: 'K, 'T |
Given a series containing optional values, flatten the option values.
That is, |
||
foldValues op init series
Signature: op:('?494593 -> 'T -> '?494593) -> init:'?494593 -> series:Series<'K,'T> -> '?494593
Type parameters: '?494593, 'T, 'K |
Aggregates the values of the specified series using a function that can combine individual values. The folding starts with the specified initial value. Parameters
|
||
force series
Signature: series:Series<'K,'V> -> Series<'K,'V>
Type parameters: 'K, 'V |
Returns a new fully evaluated series. If the source series contains a lazy index or lazy vectors, these are forced to evaluate and the resulting series is fully loaded in memory. |
||
map f series
Signature: f:('K -> 'T -> 'R) -> series:Series<'K,'T> -> Series<'K,'R>
Type parameters: 'K, 'T, 'R |
Returns a new series whose values are the results of applying the given function to values of the original series. This function skips over missing values and call the function with both keys and values. |
||
mapAll f series
Signature: f:('K -> 'T option -> 'R option) -> series:Series<'K,'T> -> Series<'K,'R>
Type parameters: 'K, 'T, 'R |
Returns a new series whose values are the results of applying the given function to
values of the original series. This specified function is called even when the value
is missing. It returns |
||
mapKeys f series
Signature: f:('K -> 'R) -> series:Series<'K,'T> -> Series<'R,'T>
Type parameters: 'K, 'R, 'T |
Returns a new series whose keys are the results of applying the given function to keys of the original series. |
||
mapValues f series
Signature: f:('T -> 'R) -> series:Series<'K,'T> -> Series<'K,'R>
Type parameters: 'T, 'R, 'K |
Returns a new series whose values are the results of applying the given function to
values of the original series. This function skips over missing values and call the
function with just values. It is also aliased using the |
||
reduceValues op series
Signature: op:('T -> 'T -> 'T) -> series:Series<'K,'T> -> 'T
Type parameters: 'T, 'K |
Aggregates the values of the specified series using a function that can combine individual values. Fails if the series contains no values. Parameters
|
||
scanAllValues foldFunc init series
Signature: foldFunc:('R option -> 'T option -> 'R option) -> init:'R option -> series:Series<'K,'T> -> Series<'K,'R>
Type parameters: 'R, 'T, 'K |
Applies a folding function starting with some initial optional value and the first optional value of the series, and continues to "scan" along the series, saving all values produced from the first function application, and yielding a new series having the original index and newly produced values. Parameters
|
||
scanValues foldFunc init series
Signature: foldFunc:('R -> 'T -> 'R) -> init:'R -> series:Series<'K,'T> -> Series<'K,'R>
Type parameters: 'R, 'T, 'K |
Applies a folding function starting with some initial value and the first value of the series, and continues to "scan" along the series, saving all values produced from the first function application, and yielding a new series having the original index and newly produced values. Any application involving a missing value yields a missing value. Parameters
|
||
shift offset series
Signature: offset:int -> series:Series<'K,'T> -> Series<'K,'T>
Type parameters: 'K, 'T |
Returns a series with values shifted by the specified offset. When the offset is
positive, the values are shifted forward and first
Parameters
RemarksIf you want to calculate the difference, e.g. |
||
skip count series
Signature: count:int -> series:Series<'K,'T> -> Series<'K,'T>
Type parameters: 'K, 'T |
Returns a series that contains the data from the original series,
except for the first Parameters
|
||
skipLast count series
Signature: count:int -> series:Series<'K,'T> -> Series<'K,'T>
Type parameters: 'K, 'T |
Returns a series that contains the data from the original series,
except for the last Parameters
|
||
take count series
Signature: count:int -> series:Series<'K,'T> -> Series<'K,'T>
Type parameters: 'K, 'T |
Returns a series that contains the specified number of keys from the original series. Parameters
|
||
takeLast count series
Signature: count:int -> series:Series<'K,'T> -> Series<'K,'T>
Type parameters: 'K, 'T |
Returns a series that contains the specified number of keys from the original series. The keys are taken from the end of the series. Parameters
|
Sorting and index manipulation
A series that is sorted by keys allows a number of additional operations (such as lookup
using the Lookp.ExactOrSmaller
lookup behavior). However, it is also possible to sort
series based on the values - although the functions for manipulation with series do not
guarantee that the order will be preserved.
To sort series by keys, use sortByKey
. Other sorting functions let you sort the series
using a specified comparer function (sortWith
), using a projection function (sortBy
)
and using the default comparison (sort
).
In addition, you can also replace the keys of a series with other keys using indexWith
or with integers using indexOrdinally
. To pick and reorder series values using to match
a list of keys use realign
.
Functions and values
Function or value | Description |
indexOrdinally series
Signature: series:Series<'K,'T> -> Series<int,'T>
Type parameters: 'K, 'T |
Return a new series containing the same values as the original series, but with
ordinal index formed by |
indexWith keys series
Signature: keys:seq<'K2> -> series:Series<'K1,'T> -> Series<'K2,'T>
Type parameters: 'K2, 'K1, 'T |
Returns a new series containing the specified keys mapped to the original values of the series. When the sequence contains fewer keys, the values from the series are dropped. When it contains more keys, the values for additional keys are missing. |
realign keys series
Signature: keys:seq<'K> -> series:Series<'K,'T> -> Series<'K,'T>
Type parameters: 'K, 'T |
Given an original series and a sequence of keys, returns a new series that contains
the matching value for each of the specified keys. The |
rev series
Signature: series:Series<'K,'T> -> Series<'K,'T>
Type parameters: 'K, 'T |
Returns a new series, containing the observations of the original series in a reverse order. |
sort series
Signature: series:Series<'K,'V> -> Series<'K,'V>
Type parameters: 'K, 'V |
Returns a new series, containing the observations of the original series sorted based on the default ordering defined on the values of the series. |
sortBy proj series
Signature: proj:('T -> 'V) -> series:Series<'K,'T> -> Series<'K,'T>
Type parameters: 'T, 'V, 'K |
Returns a new series, containing the observations of the original series sorted by values returned by the specified projection function. Parameters
|
sortByKey series
Signature: series:Series<'K,'T> -> Series<'K,'T>
Type parameters: 'K, 'T |
Returns a new series whose observations are sorted according to keys of the index. Parameters
|
sortWith comparer series
Signature: comparer:('V -> 'V -> int) -> series:Series<'K,'V> -> Series<'K,'V>
Type parameters: 'V, 'K |
Returns a new series, containing the observations of the original series sorted using the specified comparison function. Parameters
|
Other module members
Functions and values
Function or value | Description |
convert forward backward series
Signature: forward:('T -> 'R) -> backward:('R -> 'T) -> series:Series<'K,'T> -> Series<'K,'R>
Type parameters: 'T, 'R, 'K |
Retruns a new series whose values are converted using the specified conversion function.
This operation is like Parameters
RemarksThis operation is only interesting when working with virtualized data sources. Using the
|