Series
Namespace: Polars.FSharp
An eager Series holding a single column of data.
Sub-namespaces
| Sub-namespace | Page | Description |
|---|---|---|
.Array | Series.Array | Access array (fixed-size list) operations. |
.Bin | Series.Bin | Access binary operations. |
.Cat | Series.Cat | Access categorical operations. |
.Dt | Series.Dt | Access temporal (Date/Time) operations. |
.Ext | Series.Ext | Access extension datatypes operations. |
.List | Series.List | Access list operations. |
.Str | Series.Str | Access string manipulation operations. |
.Struct | Series.Struct | Access struct operations. |
Properties & Indexers
| Property | Type | Description |
|---|---|---|
DataType | DataType | Get the DataType of the Series. |
DtypeStr | string | Get the string representation of the Series Data Type (e.g., "Int64", "String"). |
IsContiguous | bool | Determines if the Series memory is physically contiguous (i.e., consists of a single chunk). |
Length | int64 | - |
NChunks | int64 | Gets the number of underlying Arrow memory chunks. |
Name | string | - |
NullCount | int64 | Get the number of null values in the Series. This is an O(1) operation (metadata access). |
Shape | int64[] | Shape of this Series. In Polars, a Series is always 1D, so this returns an array of length 1. |
SortedFlags | SortStateFlags | Gets the current sorting state flags of this series from the underlying native engine. |
Constructors & Static Methods
create
Supports: - Primitives ('T) - Option types ('T option) - ValueOption types ('T voption) Create a Series directly from a ReadOnlySpan.
Create a Series directly from a Span.
Create a Series from any sequence (List, Seq, etc.). Intelligently routes F# specific types (option/voption) to CreateSpan, while routing standard .NET types to the zero-allocation CreateGenericType.
static member create(name: string, data: ReadOnlySpan<'T>) : Series
static member create(name: string, data: Span<'T>) : Series
static member create(name: string, data: seq<'T>) : SeriesParameters
| Name | Type | Description |
|---|---|---|
name | string | - |
data | ReadOnlySpan<'T> / seq<'T> | - |
ofExpr
Create Series From single column expression.
static member ofExpr(expr: Expr) : SeriesParameters
| Name | Type | Description |
|---|---|---|
expr | Expr | - |
ofTensor
Converts an N-Dimensional .NET Tensor into a Polars Series. Automatically infers the rank and dynamically wraps the data into Polars native types: - 1D Tensors map to flat primitive columns (e.g., Float32, Int32). - N-D Tensors map to nested Array columns (e.g., Array[f32, (H, W)]).
static member ofTensor(name: string, tensor: ReadOnlyTensorSpan<'T>) : SeriesParameters
| Name | Type | Description |
|---|---|---|
name | string | The column name for the newly created Series. |
tensor | ReadOnlyTensorSpan<'T> | The source TensorSpan. Supports sliced and transposed views safely. |
Returns: A new Polars Series instance encapsulating the tensor data.
NOTE
For memory safety against non-contiguous tensor views (like transpositions), this method performs a memory materialization (Flatten) before mapping to Arrow's C Data Interface.
Operators
( + ) Addition
Add a scalar value to all elements of the Series.
Add a scalar value to all elem ents of the Series.
static member op_Addition(lhs: Series, rhs: Series) : Series
static member op_Addition(lhs: Series, rhs: int) : Series
static member op_Addition(lhs: Series, rhs: float) : Series
static member op_Addition(lhs: Series, rhs: int64) : Series
static member op_Addition(lhs: Series, rhs: float32) : Series
static member op_Addition(lhs: Series, rhs: string) : Series
static member op_Addition(lhs: Series, rhs: TimeSpan) : Series
static member op_Addition(lhs: Series, rhs: decimal) : Series
static member op_Addition(lhs: Series, rhs: bool) : SeriesParameters
| Name | Type | Description |
|---|---|---|
lhs | Series | - |
rhs | Series / int / float / int64 / float32 / string / TimeSpan / decimal / bool | - |
op_BangEquals
static member op_BangEquals(lhs: Series, rhs: Series) : SeriesParameters
| Name | Type | Description |
|---|---|---|
lhs | Series | - |
rhs | Series | - |
( ! ) Logical NOT
static member op_Dereference(s: Series) : SeriesParameters
| Name | Type | Description |
|---|---|---|
s | Series | - |
( / ) Division
static member op_Division(lhs: Series, rhs: Series) : Series
static member op_Division(lhs: Series, rhs: int) : Series
static member op_Division(lhs: Series, rhs: int64) : Series
static member op_Division(lhs: Series, rhs: float) : Series
static member op_Division(lhs: Series, rhs: float32) : Series
static member op_Division(lhs: Series, rhs: decimal) : SeriesParameters
| Name | Type | Description |
|---|---|---|
lhs | Series | - |
rhs | Series / int / int64 / float / float32 / decimal | - |
op_DotAt
static member op_DotAt(s1: Series, s2: Series) : SeriesParameters
| Name | Type | Description |
|---|---|---|
s1 | Series | - |
s2 | Series | - |
( .!= ) Not Equal
static member op_DotBangEquals(lhs: Series, rhs: int) : Series
static member op_DotBangEquals(lhs: Series, rhs: int64) : Series
static member op_DotBangEquals(lhs: Series, rhs: string) : Series
static member op_DotBangEquals(lhs: Series, rhs: float) : Series
static member op_DotBangEquals(lhs: Series, rhs: float32) : Series
static member op_DotBangEquals(lhs: Series, rhs: DateTime) : Series
static member op_DotBangEquals(lhs: Series, rhs: TimeOnly) : Series
static member op_DotBangEquals(lhs: Series, rhs: DateOnly) : Series
static member op_DotBangEquals(lhs: Series, rhs: TimeSpan) : Series
static member op_DotBangEquals(lhs: Series, rhs: decimal) : Series
static member op_DotBangEquals(lhs: Series, rhs: bool) : SeriesParameters
| Name | Type | Description |
|---|---|---|
lhs | Series | - |
rhs | int / int64 / string / float / float32 / DateTime / TimeOnly / DateOnly / TimeSpan / decimal / bool | - |
op_DotEquals
static member op_DotEquals(lhs: Series, rhs: Series) : Series
static member op_DotEquals(lhs: Series, rhs: int) : Series
static member op_DotEquals(lhs: Series, rhs: int64) : Series
static member op_DotEquals(lhs: Series, rhs: float) : Series
static member op_DotEquals(lhs: Series, rhs: string) : Series
static member op_DotEquals(lhs: Series, rhs: float32) : Series
static member op_DotEquals(lhs: Series, rhs: DateTime) : Series
static member op_DotEquals(lhs: Series, rhs: TimeOnly) : Series
static member op_DotEquals(lhs: Series, rhs: DateOnly) : Series
static member op_DotEquals(lhs: Series, rhs: TimeSpan) : Series
static member op_DotEquals(lhs: Series, rhs: decimal) : Series
static member op_DotEquals(lhs: Series, rhs: bool) : SeriesParameters
| Name | Type | Description |
|---|---|---|
lhs | Series | - |
rhs | Series / int / int64 / float / string / float32 / DateTime / TimeOnly / DateOnly / TimeSpan / decimal / bool | - |
( .> ) Greater Than
static member op_DotGreater(lhs: Series, rhs: Series) : Series
static member op_DotGreater(lhs: Series, rhs: int) : Series
static member op_DotGreater(lhs: Series, rhs: int64) : Series
static member op_DotGreater(lhs: Series, rhs: float) : Series
static member op_DotGreater(lhs: Series, rhs: float32) : Series
static member op_DotGreater(lhs: Series, rhs: DateTime) : Series
static member op_DotGreater(lhs: Series, rhs: TimeOnly) : Series
static member op_DotGreater(lhs: Series, rhs: DateOnly) : Series
static member op_DotGreater(lhs: Series, rhs: TimeSpan) : Series
static member op_DotGreater(lhs: Series, rhs: decimal) : Series
static member op_DotGreater(lhs: Series, rhs: string) : SeriesParameters
| Name | Type | Description |
|---|---|---|
lhs | Series | - |
rhs | Series / int / int64 / float / float32 / DateTime / TimeOnly / DateOnly / TimeSpan / decimal / string | - |
( .>= ) Greater Or Equal
static member op_DotGreaterEquals(lhs: Series, rhs: Series) : Series
static member op_DotGreaterEquals(lhs: Series, rhs: int) : Series
static member op_DotGreaterEquals(lhs: Series, rhs: int64) : Series
static member op_DotGreaterEquals(lhs: Series, rhs: float) : Series
static member op_DotGreaterEquals(lhs: Series, rhs: float32) : Series
static member op_DotGreaterEquals(lhs: Series, rhs: DateTime) : Series
static member op_DotGreaterEquals(lhs: Series, rhs: TimeOnly) : Series
static member op_DotGreaterEquals(lhs: Series, rhs: DateOnly) : Series
static member op_DotGreaterEquals(lhs: Series, rhs: TimeSpan) : Series
static member op_DotGreaterEquals(lhs: Series, rhs: decimal) : Series
static member op_DotGreaterEquals(lhs: Series, rhs: string) : SeriesParameters
| Name | Type | Description |
|---|---|---|
lhs | Series | - |
rhs | Series / int / int64 / float / float32 / DateTime / TimeOnly / DateOnly / TimeSpan / decimal / string | - |
( .< ) Less Than
static member op_DotLess(lhs: Series, rhs: Series) : Series
static member op_DotLess(lhs: Series, rhs: int) : Series
static member op_DotLess(lhs: Series, rhs: int64) : Series
static member op_DotLess(lhs: Series, rhs: float) : Series
static member op_DotLess(lhs: Series, rhs: float32) : Series
static member op_DotLess(lhs: Series, rhs: DateTime) : Series
static member op_DotLess(lhs: Series, rhs: TimeOnly) : Series
static member op_DotLess(lhs: Series, rhs: DateOnly) : Series
static member op_DotLess(lhs: Series, rhs: TimeSpan) : Series
static member op_DotLess(lhs: Series, rhs: decimal) : Series
static member op_DotLess(lhs: Series, rhs: string) : SeriesParameters
| Name | Type | Description |
|---|---|---|
lhs | Series | - |
rhs | Series / int / int64 / float / float32 / DateTime / TimeOnly / DateOnly / TimeSpan / decimal / string | - |
( .<= ) Less Or Equal
static member op_DotLessEquals(lhs: Series, rhs: Series) : Series
static member op_DotLessEquals(lhs: Series, rhs: int) : Series
static member op_DotLessEquals(lhs: Series, rhs: int64) : Series
static member op_DotLessEquals(lhs: Series, rhs: float) : Series
static member op_DotLessEquals(lhs: Series, rhs: float32) : Series
static member op_DotLessEquals(lhs: Series, rhs: DateTime) : Series
static member op_DotLessEquals(lhs: Series, rhs: TimeOnly) : Series
static member op_DotLessEquals(lhs: Series, rhs: DateOnly) : Series
static member op_DotLessEquals(lhs: Series, rhs: TimeSpan) : Series
static member op_DotLessEquals(lhs: Series, rhs: decimal) : Series
static member op_DotLessEquals(lhs: Series, rhs: string) : SeriesParameters
| Name | Type | Description |
|---|---|---|
lhs | Series | - |
rhs | Series / int / int64 / float / float32 / DateTime / TimeOnly / DateOnly / TimeSpan / decimal / string | - |
( .** ) Power
Power with double exponent.
Power with single exponent.
Power with int64 exponent.
Power with integer exponent.
static member op_DotMultiplyMultiply(lhs: Series, rhs: Series) : Series
static member op_DotMultiplyMultiply(lhs: Series, rhs: float32) : Series
static member op_DotMultiplyMultiply(lhs: Series, rhs: float) : Series
static member op_DotMultiplyMultiply(lhs: Series, rhs: int64) : Series
static member op_DotMultiplyMultiply(lhs: Series, rhs: int) : SeriesParameters
| Name | Type | Description |
|---|---|---|
lhs | Series | - |
rhs | Series / float32 / int64 | - |
( <<< ) Left Shift
static member op_LeftShift(lhs: Series, rhs: int) : SeriesParameters
| Name | Type | Description |
|---|---|---|
lhs | Series | - |
rhs | int | - |
( ~~~ ) Bitwise NOT
static member op_LogicalNot(s: Series) : SeriesParameters
| Name | Type | Description |
|---|---|---|
s | Series | - |
( % ) Modulus
static member op_Modulus(lhs: Series, rhs: Series) : Series
static member op_Modulus(lhs: Series, rhs: int) : Series
static member op_Modulus(lhs: Series, rhs: int64) : SeriesParameters
| Name | Type | Description |
|---|---|---|
lhs | Series | - |
rhs | Series / int / int64 | - |
( * ) Multiply
static member op_Multiply(lhs: Series, rhs: Series) : Series
static member op_Multiply(lhs: Series, rhs: int) : Series
static member op_Multiply(lhs: Series, rhs: int64) : Series
static member op_Multiply(lhs: Series, rhs: float) : Series
static member op_Multiply(lhs: Series, rhs: float32) : Series
static member op_Multiply(lhs: Series, rhs: decimal) : SeriesParameters
| Name | Type | Description |
|---|---|---|
lhs | Series | - |
rhs | Series / int / int64 / float / float32 / decimal | - |
( >>> ) Right Shift
static member op_RightShift(lhs: Series, rhs: int) : SeriesParameters
| Name | Type | Description |
|---|---|---|
lhs | Series | - |
rhs | int | - |
( - ) Subtraction
static member op_Subtraction(lhs: Series, rhs: Series) : Series
static member op_Subtraction(lhs: Series, rhs: int) : Series
static member op_Subtraction(lhs: Series, rhs: float) : Series
static member op_Subtraction(lhs: Series, rhs: int64) : Series
static member op_Subtraction(lhs: Series, rhs: float32) : Series
static member op_Subtraction(lhs: Series, rhs: TimeSpan) : Series
static member op_Subtraction(lhs: Series, rhs: decimal) : SeriesParameters
| Name | Type | Description |
|---|---|---|
lhs | Series | - |
rhs | Series / int / float / int64 / float32 / TimeSpan / decimal | - |
Instance Methods
Abs
Absolute value.
member Abs : unit -> SeriesAdd
Add two Series.
member Add(other: Series) : SeriesParameters
| Name | Type | Description |
|---|---|---|
other | Series | - |
All
Compute the bitwise XOR of the elements in this series.
member All(?ignoreNulls: bool) : bool optionParameters
| Name | Type | Description |
|---|---|---|
ignoreNulls | bool (optional) | - |
Any
Compute the bitwise XOR of the elements in this series.
member Any(?ignoreNulls: bool) : bool optionParameters
| Name | Type | Description |
|---|---|---|
ignoreNulls | bool (optional) | - |
Append
Append a Series to this one. The resulting series will consist of multiple chunks.
member Append(other: Series) : SeriesParameters
| Name | Type | Description |
|---|---|---|
other | Series | Series to append. |
AppendInplace
Appends another Series to this one in-place, mutating the underlying chunks. Returns unit to indicate side-effects.
member AppendInplace(other: Series) : unitParameters
| Name | Type | Description |
|---|---|---|
other | Series | Series to append. |
ApproxNUnique
Get an approximation of the number of unique values in this Series. Uses HyperLogLog algorithm for fast, memory-efficient counting.
member ApproxNUnique : unit -> int64Returns: Approximate count of unique values.
ArcCos
Compute the element-wise inverse cosine.
member ArcCos : unit -> SeriesArcCosh
Compute the element-wise inverse hyperbolic cosine.
member ArcCosh : unit -> SeriesArcSin
Compute the element-wise inverse sine.
member ArcSin : unit -> SeriesArcSinh
Compute the element-wise inverse hyperbolic sine.
member ArcSinh : unit -> SeriesArcTan
Compute the element-wise inverse tangent.
member ArcTan : unit -> SeriesArcTanh
Compute the element-wise inverse hyperbolic tangent.
member ArcTanh : unit -> SeriesArgMax
Compute the index of the maximum value of the elements in this series.
member ArgMax : unit -> int64 optionArgMin
Compute the index of the minimum value of the elements in this series.
member ArgMin : unit -> int64 optionArgSort
Get the index values that would sort this expression.
member ArgSort(?descending: bool, ?nullsLast: bool) : SeriesParameters
| Name | Type | Description |
|---|---|---|
descending | bool (optional) | If true, sort in descending order. Default is false. |
nullsLast | bool (optional) | If true, place null values last. Default is false. |
ArgTrue
Get index values where Boolean Series evaluate True.
member ArgTrue : unit -> SeriesReturns: Series of data type UInt32.
ArgUnique
Get the index of the unique values.
member ArgUnique : unit -> SeriesAs
Returns a zero-allocation struct enumerator for strongly-typed iteration. Usage: for v in series.As{int}() do ...
member As : unit -> SeriesEnumerator<'T>AsDangerousUnmanagedTensor
Extracts the raw unmanaged pointer and shape metadata of the underlying physical Arrow memory. Designed for zero-copy integrations with native C++ Machine Learning backends like ONNX Runtime or TorchSharp.
member AsDangerousUnmanagedTensor : unit -> (IntPtr * int64[])
member AsDangerousUnmanagedTensor(shape: ReadOnlySpan<IntPtr>) : (IntPtr * int64[])Parameters
| Name | Type | Description |
|---|---|---|
shape | ReadOnlySpan<IntPtr> | - |
Returns: A tuple containing the raw IntPtr to the first element, and a long[] representing the tensor shape.
NOTE
DANGER (LIFECYCLE WARNING): This is a zero-copy operation. The returned IntPtr points directly to native memory managed by the Rust Polars engine. It is ONLY valid as long as this Series instance remains alive. You MUST ensure the Series is not garbage collected or explicitly disposed while the native pointer is still in use by an external FFI library, otherwise it will result in a fatal segmentation fault.
AsPolarsQueryable
Transposes a Series into a native Polars LINQ queryable.
Directly creates an IQueryable with type inferred from an existing sample sequence
member AsPolarsQueryable : unit -> IQueryable<'T>
member AsPolarsQueryable(sample: seq<'T>) : IQueryable<'T>Parameters
| Name | Type | Description |
|---|---|---|
sample | seq<'T> | - |
AsQueryable
Converts a Series into an IQueryable LINQ query provider backed by Polars. For Struct Series, it is unnested into a multi-column DataFrame matching the struct fields. For scalar and other Series, it is converted into a single-column DataFrame.
Directly creates an IQueryable with type inferred from an existing sample sequence
member AsQueryable : unit -> IQueryable<'T>
member AsQueryable(sample: seq<'T>) : IQueryable<'T>Parameters
| Name | Type | Description |
|---|---|---|
sample | seq<'T> | - |
AsReadOnlySpan
Generate zero-copy ReadOnlySpan from a numeric Series.
member AsReadOnlySpan : unit -> ReadOnlySpan<'T>AsSeq
Explicitly transitions the Series to a managed sequence ('T seq) for client-side evaluation.
member AsSeq : unit -> seq<'T>AsTensor
Deep copies the underlying Arrow memory into a managed .NET Tensor{T} on the garbage-collected heap. Automatically infers the rank and dimensions: 1D data is promoted to a [N, 1] column vector, while 2D nested data becomes an [N, M] matrix.
Deep copies the underlying Arrow memory into a managed .NET Tensor{T} with an explicit N-dimensional shape.
member AsTensor : unit -> Tensor<'T>
member AsTensor(shape: ReadOnlySpan<IntPtr>) : Tensor<'T>Parameters
| Name | Type | Description |
|---|---|---|
shape | ReadOnlySpan<IntPtr> | The target dimensions. The total number of elements must match the underlying Arrow memory length. |
Returns: A new managed Tensor{T} containing the copied data. / A new managed Tensor{T} reshaped to the specified dimensions.
NOTE
Unlike AsTensorSpan{T}, this method allocates memory and performs a safe physical copy. The returned Tensor is completely independent of the Polars engine, making it safe to pass across threads or await inside asynchronous (async/Task) workflows. This method performs a safe physical copy to the managed heap. It is highly useful when reshaping flat or nested Arrow arrays into higher-dimensional structures (e.g., 3D/4D image batches like [Batch, Channel, Height, Width]) required by Machine Learning models.
AsTensorSpan
Generates a zero-copy Tensor representation from the Series. Automatically infers the shape: - 1D [Rows] for flat numeric columns. - 2D [Rows, ListSize] for List/Array columns (Perfect for Embeddings or Feature Matrices).
Generates a zero-copy N-Dimensional Tensor representation from the Series. Allows explicit reshaping of the underlying memory (e.g., for 3D/4D image matrices).
member AsTensorSpan : unit -> ReadOnlyTensorSpan<'T>
member AsTensorSpan(shape: ReadOnlySpan<IntPtr>) : ReadOnlyTensorSpan<'T>Parameters
| Name | Type | Description |
|---|---|---|
shape | ReadOnlySpan<IntPtr> | The desired dimensions. Total elements must match the underlying memory. |
Returns: A ReadOnlyTensorSpan representing the underlying Arrow memory. / A reshaped ReadOnlyTensorSpan representing the underlying Arrow memory.
AsTransposedTensorSpan
Generates a zero-copy, transposed 2D Tensor representation from a List or Array Series. By manipulating memory strides, it returns an (N x M) view of an (M x N) matrix without moving bytes.
member AsTransposedTensorSpan : unit -> ReadOnlyTensorSpan<'T>Returns: A transposed ReadOnlyTensorSpan{T} pointing to the original Arrow memory.
NOTE
This is useful when bridging with external Machine Learning libraries (like ONNX or native C++ math backends) that expect Column-Major order or specifically require a transposed matrix.
BackwardFill
Fill null values with the next non-null value.
member BackwardFill(?limit: int) : SeriesParameters
| Name | Type | Description |
|---|---|---|
limit | int (optional) | Max number of consecutive nulls to fill. |
BitLeftShift
Bitwise left shift.
member BitLeftShift(n: int) : SeriesParameters
| Name | Type | Description |
|---|---|---|
n | int | - |
BitRightShift
Bitwise right shift.
member BitRightShift(n: int) : SeriesParameters
| Name | Type | Description |
|---|---|---|
n | int | - |
BitwiseAnd
Compute the bitwise AND of the elements in this series.
member BitwiseAnd : unit -> Series
member BitwiseAnd : unit -> 'T optionBitwiseCountOnes
Get the number of set bits (1s) in the binary representation of the integer.
member BitwiseCountOnes : unit -> SeriesBitwiseCountZeros
Get the number of unset bits (0s) in the binary representation of the integer.
member BitwiseCountZeros : unit -> SeriesBitwiseLeadingOnes
Get the number of leading unset bits (0s) in the binary representation of the integer.
member BitwiseLeadingOnes : unit -> SeriesBitwiseLeadingZeros
Get the number of leading set bits (1s) in the binary representation of the integer.
member BitwiseLeadingZeros : unit -> SeriesBitwiseOr
Compute the bitwise OR of the elements in this series.
member BitwiseOr : unit -> Series
member BitwiseOr : unit -> 'T optionBitwiseTrailingOnes
Get the number of trailing set bits (1s) in the binary representation of the integer.
member BitwiseTrailingOnes : unit -> SeriesBitwiseTrailingZeros
Get the number of trailing unset bits (0s) in the binary representation of the integer.
member BitwiseTrailingZeros : unit -> SeriesBitwiseXor
Compute the bitwise XOR of the elements in this series.
member BitwiseXor : unit -> Series
member BitwiseXor : unit -> 'T optionBottomK
Get the k smallest elements. Result is sorted ascending.
member BottomK(k: int) : SeriesParameters
| Name | Type | Description |
|---|---|---|
k | int | - |
BottomKBy
Get bottom k elements of this Series, sorted by another Series.
Get bottom k elements of this Series, sorted by another Expr.
member BottomKBy(k: int, by: Series, ?reverse: bool) : Series
member BottomKBy(k: int, by: Expr, ?reverse: bool) : Series
member BottomKBy(k: int, by: seq<'a>, ?reverse: seq<bool>) : SeriesParameters
| Name | Type | Description |
|---|---|---|
k | int | - |
by | Series / Expr / seq<'a> | - |
reverse | bool (optional) / seq<bool> (optional) | - |
Cast
Cast Series to another DataType.
Cast the series to a specific .NET type.
member Cast(dtype: DataType, ?strict: bool, ?wrapNumerical: bool) : Series
member Cast(?strict: bool, ?wrapNumerical: bool) : SeriesParameters
| Name | Type | Description |
|---|---|---|
dtype | DataType | The target type |
strict | bool (optional) | Throws an error if conversion had overflows. |
wrapNumerical | bool (optional) | Allows wrapping numerical overflow. |
Returns: A new Series of the target type.
Cbrt
Cube root.
member Cbrt : unit -> SeriesCeil
Round up to the nearest integer.
member Ceil : unit -> SeriesChunkLengths
Get the length of each individual chunk.
member ChunkLengths : unit -> int64[]Returns: An array of lengths as primitive int64 values.
Clear
Create an empty copy of the current Series, with zero to ‘n’ elements. The copy has an identical name/dtype, but no data.
member Clear(?n: uint32) : SeriesParameters
| Name | Type | Description |
|---|---|---|
n | uint32 (optional) | - |
Clip
Constrain the values in the Series to a given range.
Set values outside bounds to scalar boundary values.
member Clip(?lowerBound: Expr, ?upperBound: Expr) : Series
member Clip(lowerBound: 'T, upperBound: 'T) : SeriesParameters
| Name | Type | Description |
|---|---|---|
lowerBound | Expr (optional) / 'T | Lower bound expression. |
upperBound | Expr (optional) / 'T | Upper bound expression. |
Returns: Series with values constrained to the given range.
Clip$W
member Clip$W(this: Series, lowerBound: 'T, upperBound: 'T) : SeriesParameters
| Name | Type | Description |
|---|---|---|
this | Series | - |
lowerBound | 'T | - |
upperBound | 'T | - |
Clone
member Clone : unit -> SeriesCos
Compute the element-wise cosine.
member Cos : unit -> SeriesCosh
Compute the element-wise hyperbolic cosine.
member Cosh : unit -> SeriesCot
Compute the element-wise value for the cotangent.
member Cot : unit -> SeriesCount
Compute the count of the elements in this series.
member Count : unit -> int64CumCount
Get an array with the cumulative count computed at every element.
member CumCount(?reverse: bool) : SeriesParameters
| Name | Type | Description |
|---|---|---|
reverse | bool (optional) | Reverse the operation. |
CumMax
Get an array with the cumulative max computed at every element.
member CumMax(?reverse: bool) : SeriesParameters
| Name | Type | Description |
|---|---|---|
reverse | bool (optional) | Reverse the operation. |
CumMin
Get an array with the cumulative min computed at every element.
member CumMin(?reverse: bool) : SeriesParameters
| Name | Type | Description |
|---|---|---|
reverse | bool (optional) | Reverse the operation. |
CumProd
Get an array with the cumulative prod computed at every element.
member CumProd(?reverse: bool) : SeriesParameters
| Name | Type | Description |
|---|---|---|
reverse | bool (optional) | Reverse the operation. |
CumSum
Get an array with the cumulative sum computed at every element.
member CumSum(?reverse: bool) : SeriesParameters
| Name | Type | Description |
|---|---|---|
reverse | bool (optional) | Reverse the operation. |
CumulativeEval
member CumulativeEval(expr: Expr, ?minSamples: int) : SeriesParameters
| Name | Type | Description |
|---|---|---|
expr | Expr | - |
minSamples | int (optional) | - |
Cut
Cut the series into bins based on the given breaks.
member Cut(
breaks: seq<float>,
?labels: seq<string>,
?leftClosed: bool,
?includeBreaks: bool
) : SeriesParameters
| Name | Type | Description |
|---|---|---|
breaks | seq<float> | - |
labels | seq<string> (optional) | - |
leftClosed | bool (optional) | - |
includeBreaks | bool (optional) | - |
Describe
member Describe : unit -> DataFrameDiff
Calculate the difference with a given period.
Diff by 1.
member Diff(n: int64) : Series
member Diff(n: int) : Series
member Diff : unit -> SeriesParameters
| Name | Type | Description |
|---|---|---|
n | int64 | - |
Div
Divide two Series.
member Div(other: Series) : SeriesParameters
| Name | Type | Description |
|---|---|---|
other | Series | - |
Dot
Compute the dot/inner product between two Series.
member Dot(other: Series) : Series
member Dot(other: Series) : 'T optionParameters
| Name | Type | Description |
|---|---|---|
other | Series | - |
DropNans
Drop nan values.
member DropNans : unit -> SeriesDropNulls
Drop null values.
member DropNulls : unit -> SeriesEntropy
Compute the Shannon entropy of the given Series.
member Entropy(?baseval: float, ?normalize: bool) : float optionParameters
| Name | Type | Description |
|---|---|---|
baseval | float (optional) | - |
normalize | bool (optional) | - |
Eq
Compare two Series for equality.
member Eq(other: Series) : SeriesParameters
| Name | Type | Description |
|---|---|---|
other | Series | - |
EqMissing
Compare two Series for equality, ignoring nulls.
member EqMissing(other: Series) : SeriesParameters
| Name | Type | Description |
|---|---|---|
other | Series | - |
EstimatedSize
Return an estimation of the total (heap) allocated size of the Series. Estimated size is given in the specified unit (bytes by default).
member EstimatedSize(unit: SizeUnit) : floatParameters
| Name | Type | Description |
|---|---|---|
unit | SizeUnit | Scale the returned size to the given unit (uses 1024 base). |
Returns: The estimated size as a double.
EwmMean
Compute exponentially-weighted moving average.
member EwmMean(
alpha: float,
?adjust: bool,
?bias: bool,
?minPeriods: int,
?ignoreNulls: bool
) : SeriesParameters
| Name | Type | Description |
|---|---|---|
alpha | float | Specify smoothing factor alpha directly. Constraint: 0 < alpha <= 1 |
adjust | bool (optional) | If true, divide by decaying adjustment factor in beginning periods to account for imbalance in relative weightings (viewing data as finite history). If false, assume infinite history. |
bias | bool (optional) | If true, use a biased estimator (Standard deviation uses N in denominator). If false, use an unbiased estimator (Standard deviation uses N-1). Note: This is primarily relevant for Variance/StdDev. For Mean, it typically defaults to true. |
minPeriods | int (optional) | Minimum number of observations in window required to have a value (otherwise result is null). |
ignoreNulls | bool (optional) | Ignore missing values when calculating weights. |
Returns: A new expression representing the EWM mean.
EwmMeanBy
Compute exponentially-weighted moving average based on a temporal or index column.
member EwmMeanBy(by: Expr, halfLife: string) : SeriesParameters
| Name | Type | Description |
|---|---|---|
by | Expr | The column used to determine the distance between observations. Supported data types: Date, DateTime, UInt64, UInt32, Int64, or Int32. |
halfLife | string | The unit over which an observation decays to half its value. Supported string formats: - Time units ns (nanosecond), us (microsecond), ms (millisecond), s (second), m (minute), h (hour), d (day), w (week). - Index unitsi (index count). Example: "2i" means decay by half every 2 index steps. - CompoundExample: "3d12h4m25s".Warning: halfLife is treated as a constant duration. Calendar durations such as months (mo) or years (y) are NOT supported because they vary in length. Please express such durations in hours (e.g. use '730h' instead of '1mo'). |
Returns: A new expression representing the time/index-based EWM mean.
EwmStd
Compute exponentially-weighted moving standard deviation.
member EwmStd(
alpha: float,
?adjust: bool,
?bias: bool,
?minPeriods: int,
?ignoreNulls: bool
) : SeriesParameters
| Name | Type | Description |
|---|---|---|
alpha | float | Specify smoothing factor alpha directly. Constraint: 0 < alpha <= 1 |
adjust | bool (optional) | If true, divide by decaying adjustment factor in beginning periods to account for imbalance in relative weightings (viewing data as finite history). If false, assume infinite history. |
bias | bool (optional) | If true, use a biased estimator (Standard deviation uses N in denominator). If false, use an unbiased estimator (Standard deviation uses N-1). Note: This is primarily relevant for Variance/StdDev. For Mean, it typically defaults to true. |
minPeriods | int (optional) | Minimum number of observations in window required to have a value (otherwise result is null). |
ignoreNulls | bool (optional) | Ignore missing values when calculating weights. |
Returns: A new expression representing the EWM standard deviation.
EwmSum
Compute exponentially-weighted moving sum.
member EwmSum(
alpha: float,
?adjust: bool,
?bias: bool,
?minPeriods: int,
?ignoreNulls: bool
) : SeriesParameters
| Name | Type | Description |
|---|---|---|
alpha | float | - |
adjust | bool (optional) | - |
bias | bool (optional) | - |
minPeriods | int (optional) | - |
ignoreNulls | bool (optional) | - |
EwmSumBy
Compute exponentially-weighted moving sum based on a temporal or index column.
member EwmSumBy(by: Expr, halfLife: string) : SeriesParameters
| Name | Type | Description |
|---|---|---|
by | Expr | - |
halfLife | string | - |
EwmVar
Compute exponentially-weighted moving variance.
member EwmVar(
alpha: float,
?adjust: bool,
?bias: bool,
?minPeriods: int,
?ignoreNulls: bool
) : SeriesParameters
| Name | Type | Description |
|---|---|---|
alpha | float | Specify smoothing factor alpha directly. Constraint: 0 < alpha <= 1 |
adjust | bool (optional) | If true, divide by decaying adjustment factor in beginning periods to account for imbalance in relative weightings (viewing data as finite history). If false, assume infinite history. |
bias | bool (optional) | If true, use a biased estimator (Standard deviation uses N in denominator). If false, use an unbiased estimator (Standard deviation uses N-1). Note: This is primarily relevant for Variance/StdDev. For Mean, it typically defaults to true. |
minPeriods | int (optional) | Minimum number of observations in window required to have a value (otherwise result is null). |
ignoreNulls | bool (optional) | Ignore missing values when calculating weights. |
Returns: A new expression representing the EWM variance.
Exp
Exponential (e^x).
member Exp : unit -> SeriesExplode
Explode a list column into multiple rows. The resulting Series will be longer than the original.
member Explode(?emptyAsNull: bool, ?keepNulls: bool) : SeriesParameters
| Name | Type | Description |
|---|---|---|
emptyAsNull | bool (optional) | - |
keepNulls | bool (optional) | - |
Extend
Extend the memory backed by this Series with the values from another. Different from append, which adds the chunks from other to the chunks of this series, extend appends the data from other to the underlying memory locations and thus may cause a reallocation (which is expensive). If this does not cause a reallocation, the resulting data structure will not have any extra chunks and thus will yield faster queries.
member Extend(other: Series) : SeriesParameters
| Name | Type | Description |
|---|---|---|
other | Series | Series to extend the series with. |
ExtendConstant
Extending the Series with ‘n’ copies of a value.
member ExtendConstant(value: Expr, n: Expr) : SeriesParameters
| Name | Type | Description |
|---|---|---|
value | Expr | A constant literal value or a unit expression with which to extend the expression result Series; can pass None to extend with nulls. |
n | Expr | The number of additional values that will be added. |
ExtendInplace
Extends the memory backed by this Series with the values from another in-place. This directly mutates the underlying memory buffer and may trigger reallocation. Returns unit to explicitly indicate in-place side effects.
member ExtendInplace(other: Series) : unitParameters
| Name | Type | Description |
|---|---|---|
other | Series | Series to extend this series with. |
FillNan
Fill floating-point NaN values using an expression.
Fill floating point NaN values with a literal value.
Fill floating-point NaN values with a literal float32.
Fill NaN values with values from another Series.
member FillNan(expr: Expr) : Series
member FillNan(fillValue: float) : Series
member FillNan(fillValue: float32) : Series
member FillNan(fillValue: Series) : SeriesParameters
| Name | Type | Description |
|---|---|---|
expr | Expr | The expression providing replacement values. |
fillValue | float / float32 / Series | The float32 value to replace NaN with. |
Returns: A new Series with NaN values replaced.
FillNull
Fill nulls using an expression (mostly for internal use or complex literals).
Fill null values with a scalar literal.
Fill null values with values from another Series. Useful for coalescing.
Fills null values using a built-in strategy (Forward, Backward, Mean, etc.).
member FillNull(expr: Expr) : Series
member FillNull(fillValue: 'T) : Series
member FillNull(fillValue: Series) : Series
member FillNull(strategies: FillNullStrategy, ?limit: int) : SeriesParameters
| Name | Type | Description |
|---|---|---|
expr | Expr | - |
fillValue | 'T / Series | - |
strategies | FillNullStrategy | - |
limit | int (optional) | - |
FillNull$W
member FillNull$W(this: Series, fillValue: 'T) : SeriesParameters
| Name | Type | Description |
|---|---|---|
this | Series | - |
fillValue | 'T | - |
Filter
Filter a series using a boolean series.
Filter a series using a boolean sequence.
member Filter(predicate: Series) : Series
member Filter(predicate: seq<bool>) : SeriesParameters
| Name | Type | Description |
|---|---|---|
predicate | Series / seq<bool> | Boolean series used to filter the current series. |
Returns: A new series with filtered values.
FilterWith
member FilterWith(predicate: ('T -> bool)) : SeriesParameters
| Name | Type | Description |
|---|---|---|
predicate | ('T -> bool) | - |
First
Compute the first non-null scalar value of this series.
member First : unit -> Series
member First : unit -> 'T optionFloor
Round down to the nearest integer.
member Floor : unit -> SeriesFloorDiv
Floor division (integer result).
Floor division (scalar).
member FloorDiv(other: Series) : Series
member FloorDiv(other: int) : SeriesParameters
| Name | Type | Description |
|---|---|---|
other | Series / int | - |
ForwardFill
Fill null values with the previous non-null value.
member ForwardFill(?limit: int) : SeriesParameters
| Name | Type | Description |
|---|---|---|
limit | int (optional) | Max number of consecutive nulls to fill. |
FromArrow
Converts an Arrow array to a Series.
member FromArrow(name: string, arrowArray: IArrowArray) : SeriesParameters
| Name | Type | Description |
|---|---|---|
name | string | - |
arrowArray | IArrowArray | - |
FromEpoch
Create a new Series from epoch time.
member FromEpoch(?timeUnit: EpochTimeUnit) : SeriesParameters
| Name | Type | Description |
|---|---|---|
timeUnit | EpochTimeUnit (optional) | - |
Gather
Gather values by an index expression.
member Gather(indices: Expr) : SeriesParameters
| Name | Type | Description |
|---|---|---|
indices | Expr | - |
GatherEvery
Take every nth value starting from an offset.
member GatherEvery(n: uint64, ?offset: uint64) : SeriesParameters
| Name | Type | Description |
|---|---|---|
n | uint64 | - |
offset | uint64 (optional) | - |
Get
Get a single value by index. Returns a scalar.
member Get(index: Expr, ?nullOnOutOfBounds: bool) : Series
member Get(index: uint64, ?nullOnOutOfBounds: bool) : SeriesParameters
| Name | Type | Description |
|---|---|---|
index | Expr / uint64 | The index expression. |
nullOnOutOfBounds | bool (optional) | If true, returns Null when the index is out of bounds instead of raising an error. |
GetList
Get a value as an F# List ('T list). Automatically handles conversion from .NET List (ResizeArray).
member GetList(index: int64) : 'Elem listParameters
| Name | Type | Description |
|---|---|---|
index | int64 | - |
GetSlice
F# Slice Indexer for syntax like s[1..5] or s[..^1].
member GetSlice(start: int64 option, finish: int64 option) : SeriesParameters
| Name | Type | Description |
|---|---|---|
start | int64 option | The optional inclusive start index. |
finish | int64 option | The optional inclusive end index. |
Returns: A new sliced Series subset.
GetValue
Gets a single scalar value by 64-bit index.
Get scalar value with full bounds and null checks.
member GetValue(index: int64, uncheck: bool) : 'T
member GetValue(index: int64) : 'TParameters
| Name | Type | Description |
|---|---|---|
index | int64 | The 64-bit row index. |
uncheck | bool | If true, bypasses boundary checking and null bitmap validation (internal fast-path). |
GetValueOption
Get an item as an F# Option. Ideal for safe handling of nulls in Polars series.
member GetValueOption(index: int64) : 'T optionParameters
| Name | Type | Description |
|---|---|---|
index | int64 | - |
Gt
Check if values in the first Series are greater than the second Series.
member Gt(other: Series) : SeriesParameters
| Name | Type | Description |
|---|---|---|
other | Series | - |
GtEq
Check if values in the first Series are greater than or equal to the second Series.
member GtEq(other: Series) : SeriesParameters
| Name | Type | Description |
|---|---|---|
other | Series | - |
HasNulls
Check whether the Series contains one or more null values.
member HasNulls : unit -> boolHash
Compute the hash of the given Series.
member Hash(
?seed: uint64,
?seed1: uint64,
?seed2: uint64,
?seed3: uint64
) : SeriesParameters
| Name | Type | Description |
|---|---|---|
seed | uint64 (optional) | - |
seed1 | uint64 (optional) | - |
seed2 | uint64 (optional) | - |
seed3 | uint64 (optional) | - |
Hist
Create a histogram of the given series.
member Hist(
?bins: Expr,
?binCount: int,
?includeCategory: bool,
?includeBreakPoint: bool
) : DataFrameParameters
| Name | Type | Description |
|---|---|---|
bins | Expr (optional) | - |
binCount | int (optional) | - |
includeCategory | bool (optional) | - |
includeBreakPoint | bool (optional) | - |
Implode
Aggregate values into a list. Result is a Series with 1 row containing a List of all values.
member Implode : unit -> SeriesIndexOf
Find the index of the first occurrence of a specific value.
member IndexOf(element: Expr) : int optionParameters
| Name | Type | Description |
|---|---|---|
element | Expr | The element expression to search for. |
Interpolate
Interpolate intermediate values. The interpolation method can be configured.
Nulls at the beginning and end of the series remain null.
member Interpolate(?method: InterpolationMethod) : SeriesParameters
| Name | Type | Description |
|---|---|---|
method | InterpolationMethod (optional) | Interpolation method (Linear or Nearest). |
InterpolateBy
Interpolates intermediate values guided by an independent variable series.
member InterpolateBy(by: Series) : Series
member InterpolateBy(by: Expr) : SeriesParameters
| Name | Type | Description |
|---|---|---|
by | Series / Expr | - |
IsBetween
Check if values are between lower and upper bounds.
member IsBetween(lower: Expr, upper: Expr, ?closedInterval: ClosedInterval) : SeriesParameters
| Name | Type | Description |
|---|---|---|
lower | Expr | - |
upper | Expr | - |
closedInterval | ClosedInterval (optional) | - |
IsClose
member IsClose(
other: Expr,
?absTol: float,
?relTol: float,
?nansEqual: bool
) : SeriesParameters
| Name | Type | Description |
|---|---|---|
other | Expr | - |
absTol | float (optional) | - |
relTol | float (optional) | - |
nansEqual | bool (optional) | - |
IsDuplicated
Get a boolean mask indicating which values are duplicated.
member IsDuplicated : unit -> SeriesIsEmpty
True if the Series is empty.
member IsEmpty(?ignoreNulls: bool) : boolParameters
| Name | Type | Description |
|---|---|---|
ignoreNulls | bool (optional) | - |
IsFinite
Check if floating point values are finite (not NaN and not Inf).
member IsFinite : unit -> SeriesIsFirstDistinct
Return a boolean mask indicating the first occurrence of each distinct value.
member IsFirstDistinct : unit -> SeriesIsIn
Check if elements of this Series are in the other Series.
Check if elements of this Series are in the collections.
member IsIn(other: Series, ?nullsEqual: bool) : Series
member IsIn(collection: seq<'T>, ?nullsEqual: bool) : SeriesParameters
| Name | Type | Description |
|---|---|---|
other | Series | - |
nullsEqual | bool (optional) | - |
collection | seq<'T> | - |
IsInfinite
Check if floating point values are infinite.
member IsInfinite : unit -> SeriesIsLastDistinct
Return a boolean mask indicating the last occurrence of each distinct value.
member IsLastDistinct : unit -> SeriesIsNan
Check if floating point values are NaN.
member IsNan : unit -> SeriesIsNotNan
Check if floating point values are not NaN.
member IsNotNan : unit -> SeriesIsNotNull
Returns a boolean Series indicating which values are not null.
member IsNotNull : unit -> SeriesIsNull
Returns a boolean Series indicating which values are null.
member IsNull : unit -> SeriesIsNullAt
Check whether indexed value is null。
Check whether indexed value is null.
member IsNullAt(index: int64, ?uncheck: bool) : bool
member IsNullAt(index: int, ?uncheck: bool) : boolParameters
| Name | Type | Description |
|---|---|---|
index | int64 | - |
uncheck | bool (optional) | - |
IsSorted
Checks if the Series is sorted according to the given rules. If the metadata flag matches, returns O(1). Otherwise, scans the data O(N).
member IsSorted(?descending: bool, ?nullsLast: bool) : boolParameters
| Name | Type | Description |
|---|---|---|
descending | bool (optional) | - |
nullsLast | bool (optional) | - |
IsUnique
Get a boolean mask indicating which values are unique.
member IsUnique : unit -> SeriesItem
[Indexer] Access value at specific index. Syntax: series.[index]
member Item(index: int) : 'TParameters
| Name | Type | Description |
|---|---|---|
index | int | - |
Iter
Applies a dense action to non-null scalar elements in the Series. Null rows are automatically skipped.
member Iter(action: ('T -> unit)) : unitParameters
| Name | Type | Description |
|---|---|---|
action | ('T -> unit) | Action invoked only for present scalar elements ('T -> unit). |
Iter2
Pairwise dense traversal over two Series. Invokes action only when both elements are non-null.
member Iter2(other: Series, action: ('T1 -> ('T2 -> unit))) : unitParameters
| Name | Type | Description |
|---|---|---|
other | Series | - |
action | ('T1 -> ('T2 -> unit)) | - |
Iter2Opt
Pairwise traversal over two equal-length Series, passing ValueOptions for both columns. Guarantees that null occurrences in either Series can be explicitly observed and handled.
member Iter2Opt(other: Series, action: ('T1 voption -> ('T2 voption -> unit))) : unitParameters
| Name | Type | Description |
|---|---|---|
other | Series | - |
action | ('T1 voption -> ('T2 voption -> unit)) | - |
IterOpt
Applies an action to every row in the Series, passing a ValueOption representing whether the element is present (ValueSome 'T) or null (ValueNone). Never skips rows silently, allowing explicit handling of nulls.
member IterOpt(action: ('T voption -> unit)) : unitParameters
| Name | Type | Description |
|---|---|---|
action | ('T voption -> unit) | Action invoked for every row ('T voption -> unit). |
Iteri
Applies a dense action to non-null scalar elements along with their row index. Null rows are skipped.
member Iteri(action: (int64 -> ('T -> unit))) : unitParameters
| Name | Type | Description |
|---|---|---|
action | (int64 -> ('T -> unit)) | - |
IteriOpt
Applies an action to every row with its 64-bit index, passing a ValueOption for each row.
member IteriOpt(action: (int64 -> ('T voption -> unit))) : unitParameters
| Name | Type | Description |
|---|---|---|
action | (int64 -> ('T voption -> unit)) | - |
Kurtosis
Get the Kurtosis.
member Kurtosis(?fisher: bool, ?bias: bool) : float optionParameters
| Name | Type | Description |
|---|---|---|
fisher | bool (optional) | If True, Fisher’s definition is used (normal ==> 0.0). If False, Pearson’s definition is used (normal ==> 3.0). |
bias | bool (optional) | If False, the calculations are corrected for statistical bias. |
Last
Compute the last non-null scalar value of this series.
member Last : unit -> Series
member Last : unit -> 'T optionLen
Get the number of values in the Series.
member Len : unit -> int64Ln
Natural logarithm (ln).
member Ln : unit -> SeriesLog
Logarithm with scalar base.
member Log(baseVal: float) : SeriesParameters
| Name | Type | Description |
|---|---|---|
baseVal | float | - |
Log10
Logarithm base 10.
member Log10 : unit -> SeriesLog1p
Natural logarithm of 1 + x.
member Log1p : unit -> SeriesLowerBound
Return the lower bound of this Series’ dtype as a unit Series.
member LowerBound : unit -> SeriesLt
Check if values in the first Series are less than the second Series.
member Lt(other: Series) : SeriesParameters
| Name | Type | Description |
|---|---|---|
other | Series | - |
LtEq
Check if values in the first Series are less than or equal to the second Series.
member LtEq(other: Series) : SeriesParameters
| Name | Type | Description |
|---|---|---|
other | Series | - |
Map
Apply a custom function (UDF) assuming the output type is the same as the input.
Map values using a standard F# function. Automatically wraps it using Udf.map.
member Map(func: (IArrowArray -> IArrowArray)) : Series
member Map(f: ('T -> 'U)) : SeriesParameters
| Name | Type | Description |
|---|---|---|
func | (IArrowArray -> IArrowArray) | The compiled UDF. |
f | ('T -> 'U) | - |
MapArrow
Apply a custom function (UDF) to the Series. Uses Apache Arrow arrays for high-performance data transfer.
member MapArrow(func: (IArrowArray -> IArrowArray), ?returnType: DataType) : SeriesParameters
| Name | Type | Description |
|---|---|---|
func | (IArrowArray -> IArrowArray) | The compiled UDF (created via Udf.map or Udf.mapOption). |
returnType | DataType (optional) | The expected output DataType. Required for Polars query planning. |
MapOption
Map values using an F# function that handles Options. Automatically wraps it using Udf.mapOption.
member MapOption(f: ('T option -> 'U option)) : SeriesParameters
| Name | Type | Description |
|---|---|---|
f | ('T option -> 'U option) | - |
MapValueOption
Map values using an F# function that handles Value Options. Automatically wraps it using Udf.mapValueOption.
member MapValueOption(f: ('T voption -> 'U voption)) : SeriesParameters
| Name | Type | Description |
|---|---|---|
f | ('T voption -> 'U voption) | - |
Max
Compute the maximum scalar value of this series.
member Max : unit -> Series
member Max : unit -> 'T optionMaxBy
Compute the maximum value of the elements in this series, grouped by another series.
member MaxBy(by: Expr) : Series
member MaxBy(by: Expr) : 'T optionParameters
| Name | Type | Description |
|---|---|---|
by | Expr | - |
Mean
Compute the mean of the elements in this series.
member Mean : unit -> Series
member Mean : unit -> 'T optionMedian
Get the median.
member Median : unit -> 'T optionReturns: A new Series containing the Median (length 1).
Min
Compute the minimum scalar value of this series.
member Min : unit -> Series
member Min : unit -> 'T optionMinBy
Compute the minimum value of the elements in this series, grouped by another series.
member MinBy(by: Expr) : Series
member MinBy(by: Expr) : 'T optionParameters
| Name | Type | Description |
|---|---|---|
by | Expr | - |
Mod
Modulo (remainder).
Modulo (scalar).
member Mod(other: Series) : Series
member Mod(other: int) : Series
member Mod(other: int64) : SeriesParameters
| Name | Type | Description |
|---|---|---|
other | Series / int / int64 | - |
Mode
Get the mode.
member Mode(?maintainOrder: bool) : SeriesParameters
| Name | Type | Description |
|---|---|---|
maintainOrder | bool (optional) | - |
Returns: A new Series containing the Mode (length 1).
Mul
Multiply two Series.
member Mul(other: Series) : SeriesParameters
| Name | Type | Description |
|---|---|---|
other | Series | - |
NUnique
Count the number of unique values.
member NUnique : unit -> int64NanMax
Compute the maximum scalar value of this series, ignoring NaN values.
member NanMax : unit -> Series
member NanMax : unit -> 'T optionNanMin
Compute the minimum scalar value of this series, ignoring NaN values.
member NanMin : unit -> Series
member NanMin : unit -> 'T optionNeq
Compare two Series for inequality.
member Neq(other: Series) : SeriesParameters
| Name | Type | Description |
|---|---|---|
other | Series | - |
NeqMissing
Compare two Series for inequality, ignoring nulls.
member NeqMissing(other: Series) : SeriesParameters
| Name | Type | Description |
|---|---|---|
other | Series | - |
NewFromIndex
Create a new Series filled with values from the given index.
member NewFromIndex(index: int64, length: int64) : SeriesParameters
| Name | Type | Description |
|---|---|---|
index | int64 | - |
length | int64 | - |
Not
Negate the boolean values in a Boolean Series. True becomes False, False becomes True.
member Not : unit -> SeriesPctChange
Computes percentage change between values. Percentage change (as fraction) between current element and most-recent non-null element at least n period(s) before the current element. Computes the change from the previous row by default.
member PctChange(?n: int) : SeriesParameters
| Name | Type | Description |
|---|---|---|
n | int (optional) | Periods to shift for forming percent change.Default:1 |
Returns: A new Series containing the Var (length 1).
PeakMax
Peak maximum value of the series.
member PeakMax : unit -> SeriesPeakMin
Peak minimum value of the series.
member PeakMin : unit -> SeriesPow
Power with double exponent.
Power with single exponent.
Power with int64 exponent.
Power with integer exponent.
Power with Series exponent.
member Pow(exponent: float) : Series
member Pow(exponent: float32) : Series
member Pow(exponent: int64) : Series
member Pow(exponent: int) : Series
member Pow(exponent: Series) : SeriesParameters
| Name | Type | Description |
|---|---|---|
exponent | float / float32 / int64 / Series | - |
Product
Compute the product of the elements in this series.
member Product : unit -> Series
member Product : unit -> 'T optionQCut
Quantile cut the series into bins based on the given quantiles.
member QCut(
quantiles: seq<float>,
?labels: seq<string>,
?leftClosed: bool,
?allowDuplicates: bool,
?includeBreaks: bool
) : Series
member QCut(
quantiles: int,
?labels: seq<string>,
?leftClosed: bool,
?allowDuplicates: bool,
?includeBreaks: bool
) : SeriesParameters
| Name | Type | Description |
|---|---|---|
quantiles | seq<float> / int | - |
labels | seq<string> (optional) | - |
leftClosed | bool (optional) | - |
allowDuplicates | bool (optional) | - |
includeBreaks | bool (optional) | - |
Quantile
Get the quantile.
member Quantile(q: float, ?interpolation: QuantileMethod) : SeriesParameters
| Name | Type | Description |
|---|---|---|
q | float | Quantile between 0.0 and 1.0. |
interpolation | QuantileMethod (optional) | Interpolation method ("nearest", "higher", "lower", "midpoint", "linear"). Default "linear". |
Rank
Assign ranks to data, dealing with ties appropriately.
member Rank(?method: RankMethod, ?descending: bool, ?seed: uint64) : SeriesParameters
| Name | Type | Description |
|---|---|---|
method | RankMethod (optional) | The method used to assign ranks to tied elements. See RankMethod for details. Default is RankMethod.Average. |
descending | bool (optional) | Rank in descending order. |
seed | uint64 (optional) | If method="random", use this as seed. |
Rechunk
member Rechunk : unit -> SeriesReturns: A new Series instance backed by contiguous memory.
NOTE
Polars Operations like Appending or Filtering can create fragmented memory chunks. Calling Rechunk() merges these chunks into a single contiguous Arrow array. This is CRITICAL before zero-copy extracting native pointers for Tensors or FFI.
Reinterpret
Reinterpret the dtype of the Series.
member Reinterpret(?signed: bool) : Series
member Reinterpret(dtype: DataType) : SeriesParameters
| Name | Type | Description |
|---|---|---|
signed | bool (optional) | - |
dtype | DataType | - |
Rem
member Rem(other: Series) : Series
member Rem(other: int) : SeriesParameters
| Name | Type | Description |
|---|---|---|
other | Series / int | - |
Rename
Rename the Series in-place. Returns self.
member Rename(name: string) : SeriesParameters
| Name | Type | Description |
|---|---|---|
name | string | - |
RepeatBy
Repeat this Series by the given expression.
member RepeatBy(by: Expr) : SeriesParameters
| Name | Type | Description |
|---|---|---|
by | Expr | Expression to repeat by. |
Returns: Series with values repeated by the given expression.
Replace
Replace values where the condition matches the old expression with the new expression.
Replace values with scalar.
member Replace(old: Expr, newExpr: Expr) : Series
member Replace(oldVal: 'Old, newVal: 'New) : SeriesParameters
| Name | Type | Description |
|---|---|---|
old | Expr | - |
newExpr | Expr | - |
oldVal | 'Old | - |
newVal | 'New | - |
Replace$W
member Replace$W(
op_Dollar1: (LitMechanism -> ('New -> Expr)),
this: Series,
oldVal: 'Old,
newVal: 'New
) : SeriesParameters
| Name | Type | Description |
|---|---|---|
op_Dollar1 | (LitMechanism -> ('New -> Expr)) | - |
this | Series | - |
oldVal | 'Old | - |
newVal | 'New | - |
ReplaceStrict
member ReplaceStrict(
old: Expr,
newExpr: Expr,
?defaultExpr: Expr,
?returnDataType: DataTypeExpr
) : SeriesParameters
| Name | Type | Description |
|---|---|---|
old | Expr | - |
newExpr | Expr | - |
defaultExpr | Expr (optional) | - |
returnDataType | DataTypeExpr (optional) | - |
Reshape
Reshape this Series to a flat Series or an Array Series.
member Reshape(dimensions: seq<int64>) : SeriesParameters
| Name | Type | Description |
|---|---|---|
dimensions | seq<int64> | Tuple of the dimension sizes. If a -1 is used in any of the dimensions, that dimension is inferred. |
Returns: Tuple of the dimension sizes. If a -1 is used in any of the dimensions, that dimension is inferred.
Reverse
Reverse the order of the values in the Series. This is done in-place and will reallocate if the capacity is not sufficient.
member Reverse : unit -> SeriesRle
Run length encoding of the series.
member Rle : unit -> SeriesRleId
Run length encoding of the series.
member RleId : unit -> SeriesRollingKurtosis
Apply a rolling kurtosis over a window.
member RollingKurtosis(
windowSize: Dur,
?minPeriod: int,
?weights: float[],
?center: bool,
?fisher: bool,
?bias: bool
) : SeriesParameters
| Name | Type | Description |
|---|---|---|
windowSize | Dur | The size of the window formatted as a string duration. Examples: "3i" (3 index rows), "1d" (1 day), "1h" (1 hour). |
minPeriod | int (optional) | The minimum number of observations in the window required to have a value (otherwise null). |
weights | float[] (optional) | Optional weights to apply to the window. The length of the array should match the window size (if using fixed row windows). Default is null (unweighted). |
center | bool (optional) | If true, the window is centered on the current observation. Default is false (right-aligned window, [i-window, i]). |
fisher | bool (optional) | If True, Fisher’s definition is used (normal ==> 0.0). If False, Pearson’s definition is used (normal ==> 3.0). |
bias | bool (optional) | If False, the calculations are corrected for statistical bias. |
Returns: A new Series with the rolling skew.
RollingMax
Apply a rolling max (moving max) over a window.
member RollingMax(
windowSize: Dur,
?minPeriod: int,
?weights: float[],
?center: bool
) : SeriesParameters
| Name | Type | Description |
|---|---|---|
windowSize | Dur | The size of the window formatted as a string duration. Examples: "3i" (3 index rows), "1d" (1 day), "1h" (1 hour). |
minPeriod | int (optional) | The minimum number of observations in the window required to have a value (otherwise null). |
weights | float[] (optional) | Optional weights to apply to the window. The length of the array should match the window size (if using fixed row windows). Default is null (unweighted). |
center | bool (optional) | If true, the window is centered on the current observation. Default is false (right-aligned window, [i-window, i]). |
Returns: A new Series with the rolling maximum.
RollingMaxBy
Apply a rolling max (moving max) over a dynamic window defined by the values in the by column.
Unlike standard fixed-size rolling windows (which operate on row counts), this operates on values (typically time).
member RollingMaxBy(
windowSize: Dur,
by: Expr,
?closed: ClosedInterval,
?minPeriod: int
) : SeriesParameters
| Name | Type | Description |
|---|---|---|
windowSize | Dur | The size of the dynamic window. Supported duration strings: "1d", "2h", "10s", "500ms", etc. |
by | Expr | The column used to define the window (the "time" axis). Typically a Date or DateTime column, but can also be monotonic integers. |
closed | ClosedInterval (optional) | Defines how the window interval is closed. Default is ClosedWindow.Left``[t - window, t). |
minPeriod | int (optional) | The minimum number of observations in the window required to have a non-null result. |
Returns: A new series representing the dynamic rolling max.
NOTE
The by column must be sorted in ascending order.
RollingMean
Apply a rolling average (moving average) over a window.
member RollingMean(
windowSize: Dur,
?minPeriod: int,
?weights: float[],
?center: bool
) : SeriesParameters
| Name | Type | Description |
|---|---|---|
windowSize | Dur | The size of the window formatted as a string duration. Examples: "3i" (3 index rows), "1d" (1 day), "1h" (1 hour). |
minPeriod | int (optional) | The minimum number of observations in the window required to have a value (otherwise null). |
weights | float[] (optional) | Optional weights to apply to the window. The length of the array should match the window size (if using fixed row windows). Default is null (unweighted). |
center | bool (optional) | If true, the window is centered on the current observation. Default is false (right-aligned window, [i-window, i]). |
Returns: A new Series with the rolling average.
RollingMeanBy
Apply a rolling mean (moving average) over a dynamic window defined by the values in the by column.
Unlike standard fixed-size rolling windows (which operate on row counts), this operates on values (typically time).
member RollingMeanBy(
windowSize: Dur,
by: Expr,
?closed: ClosedInterval,
?minPeriod: int
) : SeriesParameters
| Name | Type | Description |
|---|---|---|
windowSize | Dur | The size of the dynamic window. Supported duration strings: "1d", "2h", "10s", "500ms", etc. |
by | Expr | The column used to define the window (the "time" axis). Typically a Date or DateTime column, but can also be monotonic integers. |
closed | ClosedInterval (optional) | Defines how the window interval is closed. Default is ClosedWindow.Left``[t - window, t). |
minPeriod | int (optional) | The minimum number of observations in the window required to have a non-null result. |
Returns: A new series representing the dynamic rolling mean.
NOTE
The by column must be sorted in ascending order.
RollingMedian
Apply a rolling median (moving median) over a window.
member RollingMedian(
windowSize: Dur,
?minPeriod: int,
?weights: float[],
?center: bool
) : SeriesParameters
| Name | Type | Description |
|---|---|---|
windowSize | Dur | The size of the window formatted as a string duration. Examples: "3i" (3 index rows), "1d" (1 day), "1h" (1 hour). |
minPeriod | int (optional) | The minimum number of observations in the window required to have a value (otherwise null). |
weights | float[] (optional) | Optional weights to apply to the window. The length of the array should match the window size (if using fixed row windows). Default is null (unweighted). |
center | bool (optional) | If true, the window is centered on the current observation. Default is false (right-aligned window, [i-window, i]). |
Returns: A new Series with the rolling median.
RollingMedianBy
Apply a rolling median (moving median) over a dynamic window defined by the values in the by column.
Unlike standard fixed-size rolling windows (which operate on row counts), this operates on values (typically time).
member RollingMedianBy(
windowSize: Dur,
by: Expr,
?closed: ClosedInterval,
?minPeriod: int
) : SeriesParameters
| Name | Type | Description |
|---|---|---|
windowSize | Dur | The size of the dynamic window. Supported duration strings: "1d", "2h", "10s", "500ms", etc. |
by | Expr | The column used to define the window (the "time" axis). Typically a Date or DateTime column, but can also be monotonic integers. |
closed | ClosedInterval (optional) | Defines how the window interval is closed. Default is ClosedWindow.Left``[t - window, t). |
minPeriod | int (optional) | The minimum number of observations in the window required to have a non-null result. |
Returns: A new series representing the dynamic rolling max.
NOTE
The by column must be sorted in ascending order.
RollingMin
Apply a rolling min (moving min) over a window.
member RollingMin(
windowSize: Dur,
?minPeriod: int,
?weights: float[],
?center: bool
) : SeriesParameters
| Name | Type | Description |
|---|---|---|
windowSize | Dur | The size of the window formatted as a string duration. Examples: "3i" (3 index rows), "1d" (1 day), "1h" (1 hour). |
minPeriod | int (optional) | The minimum number of observations in the window required to have a value (otherwise null). |
weights | float[] (optional) | Optional weights to apply to the window. The length of the array should match the window size (if using fixed row windows). Default is null (unweighted). |
center | bool (optional) | If true, the window is centered on the current observation. Default is false (right-aligned window, [i-window, i]). |
Returns: A new Series with the rolling minimum.
RollingMinBy
Apply a rolling min (moving min) over a dynamic window defined by the values in the by column.
Unlike standard fixed-size rolling windows (which operate on row counts), this operates on values (typically time).
member RollingMinBy(
windowSize: Dur,
by: Expr,
?closed: ClosedInterval,
?minPeriod: int
) : SeriesParameters
| Name | Type | Description |
|---|---|---|
windowSize | Dur | The size of the dynamic window. Supported duration strings: "1d", "2h", "10s", "500ms", etc. |
by | Expr | The column used to define the window (the "time" axis). Typically a Date or DateTime column, but can also be monotonic integers. |
closed | ClosedInterval (optional) | Defines how the window interval is closed. Default is ClosedWindow.Left``[t - window, t). |
minPeriod | int (optional) | The minimum number of observations in the window required to have a non-null result. |
Returns: A new series representing the dynamic rolling min.
NOTE
The by column must be sorted in ascending order.
RollingQuantile
Apply a rolling quantile over a fixed window.
member RollingQuantile(
quantile: float,
method: QuantileMethod,
windowSize: Dur,
?minPeriod: int,
?weights: float[],
?center: bool
) : SeriesParameters
| Name | Type | Description |
|---|---|---|
quantile | float | Quantile between 0.0 and 1.0 (e.g., 0.5 for median). |
method | QuantileMethod | Interpolation method when the quantile lies between two data points. |
windowSize | Dur | The size of the window. Format: "3i" (3 rows) or just a number string "3".For time-based windows (e.g. "2h"), use RollingQuantileBy instead. |
minPeriod | int (optional) | The minimum number of observations in the window required to have a value (otherwise null). |
weights | float[] (optional) | Optional weights for the window. The length must match the parsed window size. If null, equal weights are used. |
center | bool (optional) | If true, the window is centered on the current observation. Default is false (right-aligned window, [i-window, i]). |
Returns: A new series representing the rolling quantile.
RollingQuantileBy
Apply a rolling quantile (moving quantile) over a dynamic window defined by the values in the by column.
Unlike standard fixed-size rolling windows (which operate on row counts), this operates on values (typically time).
member RollingQuantileBy(
quantile: float,
method: QuantileMethod,
windowSize: Dur,
by: Expr,
?closed: ClosedInterval,
?minPeriod: int
) : SeriesParameters
| Name | Type | Description |
|---|---|---|
quantile | float | Quantile between 0.0 and 1.0 (e.g., 0.5 for median). |
method | QuantileMethod | Interpolation method when the quantile lies between two data points. |
windowSize | Dur | The size of the time window as a TimeSpan. This will be automatically converted to a Polars duration string (e.g., 01:30:00 -> "1h30m"). |
by | Expr | The column used to define the window (the "time" axis). Typically a Date or DateTime column, but can also be monotonic integers. |
closed | ClosedInterval (optional) | Defines how the window interval is closed. Default is ClosedWindow.Left``[t - window, t). |
minPeriod | int (optional) | The minimum number of observations in the window required to have a non-null result. |
Returns: A new series representing the dynamic rolling quantile.
NOTE
The by column must be sorted in ascending order.
RollingRank
Apply a rolling rank (moving rank) over a window.
member RollingRank(
windowSize: Dur,
?minPeriod: int,
?method: RankMethod,
?seed: uint64,
?weights: float[],
?center: bool
) : SeriesParameters
| Name | Type | Description |
|---|---|---|
windowSize | Dur | The size of the time window as a TimeSpan. This will be automatically converted to a Polars duration string (e.g., 01:30:00 -> "1h30m"). |
minPeriod | int (optional) | The minimum number of observations in the window required to have a value (otherwise null). |
method | RankMethod (optional) | The method used to assign ranks to tied elements. See RankMethod for details. Default is RankMethod.Average. |
seed | uint64 (optional) | If method="random", use this as seed. |
weights | float[] (optional) | Optional weights to apply to the window. The length of the array should match the window size (if using fixed row windows). Default is null (unweighted). |
center | bool (optional) | If true, the window is centered on the current observation. Default is false (right-aligned window, [i-window, i]). |
RollingRankBy
Apply a rolling rank (moving rank) over a dynamic window defined by the values in the by column.
Unlike standard fixed-size rolling windows (which operate on row counts), this operates on values (typically time).
member RollingRankBy(
windowSize: Dur,
by: Expr,
?method: RollingRankMethod,
?seed: uint64,
?closed: ClosedInterval,
?minPeriod: int
) : SeriesParameters
| Name | Type | Description |
|---|---|---|
windowSize | Dur | The size of the dynamic window. Supported duration strings: "1d", "2h", "10s", "500ms", etc. |
by | Expr | The column used to define the window (the "time" axis). Typically a Date or DateTime column, but can also be monotonic integers. |
method | RollingRankMethod (optional) | The method used to assign ranks to tied elements. |
seed | uint64 (optional) | Seed for the random method (only relevant when method is Random). |
closed | ClosedInterval (optional) | Defines how the window interval is closed. Default is ClosedWindow.Left``[t - window, t). |
minPeriod | int (optional) | The minimum number of observations in the window required to have a non-null result. |
Returns: A new series representing the dynamic rolling rank.
NOTE
The by column must be sorted in ascending order.
RollingSkew
Apply a rolling skew (moving skew) over a window.
member RollingSkew(
windowSize: Dur,
?minPeriod: int,
?weights: float[],
?center: bool,
?bias: bool
) : SeriesParameters
| Name | Type | Description |
|---|---|---|
windowSize | Dur | The size of the window formatted as a string duration. Examples: "3i" (3 index rows), "1d" (1 day), "1h" (1 hour). |
minPeriod | int (optional) | The minimum number of observations in the window required to have a value (otherwise null). |
weights | float[] (optional) | Optional weights to apply to the window. The length of the array should match the window size (if using fixed row windows). Default is null (unweighted). |
center | bool (optional) | If true, the window is centered on the current observation. Default is false (right-aligned window, [i-window, i]). |
bias | bool (optional) | If False, the calculations are corrected for statistical bias. |
Returns: A new Series with the rolling skew.
RollingStd
Apply a rolling standard deviation (moving standard deviation) over a window.
member RollingStd(
windowSize: Dur,
?minPeriod: int,
?weights: float[],
?center: bool
) : SeriesParameters
| Name | Type | Description |
|---|---|---|
windowSize | Dur | The size of the window formatted as a string duration. Examples: "3i" (3 index rows), "1d" (1 day), "1h" (1 hour). |
minPeriod | int (optional) | The minimum number of observations in the window required to have a value (otherwise null). |
weights | float[] (optional) | Optional weights to apply to the window. The length of the array should match the window size (if using fixed row windows). Default is null (unweighted). |
center | bool (optional) | If true, the window is centered on the current observation. Default is false (right-aligned window, [i-window, i]). |
Returns: A new Series with the rolling standard deviation.
RollingStdBy
Apply a rolling standard deviation (moving standard deviation) over a dynamic window defined by the values in the by column.
Unlike standard fixed-size rolling windows (which operate on row counts), this operates on values (typically time).
member RollingStdBy(
windowSize: Dur,
by: Expr,
?closed: ClosedInterval,
?minPeriod: int
) : SeriesParameters
| Name | Type | Description |
|---|---|---|
windowSize | Dur | The size of the dynamic window. Supported duration strings: "1d", "2h", "10s", "500ms", etc. |
by | Expr | The column used to define the window (the "time" axis). Typically a Date or DateTime column, but can also be monotonic integers. |
closed | ClosedInterval (optional) | Defines how the window interval is closed. Default is ClosedWindow.Left``[t - window, t). |
minPeriod | int (optional) | The minimum number of observations in the window required to have a non-null result. |
Returns: A new series representing the dynamic rolling standard deviation.
NOTE
The by column must be sorted in ascending order.
RollingSum
Apply a rolling sum (moving sum) over a window.
member RollingSum(
windowSize: Dur,
?minPeriod: int,
?weights: float[],
?center: bool
) : SeriesParameters
| Name | Type | Description |
|---|---|---|
windowSize | Dur | The size of the window formatted as a string duration. Examples: "3i" (3 index rows), "1d" (1 day), "1h" (1 hour). |
minPeriod | int (optional) | The minimum number of observations in the window required to have a value (otherwise null). |
weights | float[] (optional) | Optional weights to apply to the window. The length of the array should match the window size (if using fixed row windows). Default is null (unweighted). |
center | bool (optional) | If true, the window is centered on the current observation. Default is false (right-aligned window, [i-window, i]). |
Returns: A new Series with the rolling sum.
RollingSumBy
Apply a rolling sum (moving sum) over a dynamic window defined by the values in the by column.
Unlike standard fixed-size rolling windows (which operate on row counts), this operates on values (typically time).
member RollingSumBy(
windowSize: Dur,
by: Expr,
?closed: ClosedInterval,
?minPeriod: int
) : SeriesParameters
| Name | Type | Description |
|---|---|---|
windowSize | Dur | The size of the dynamic window. Supported duration strings: "1d", "2h", "10s", "500ms", etc. |
by | Expr | The column used to define the window (the "time" axis). Typically a Date or DateTime column, but can also be monotonic integers. |
closed | ClosedInterval (optional) | Defines how the window interval is closed. Default is ClosedWindow.Left``[t - window, t). |
minPeriod | int (optional) | The minimum number of observations in the window required to have a non-null result. |
Returns: A new series representing the dynamic rolling sum.
NOTE
The by column must be sorted in ascending order.
RollingVar
Apply a rolling variance (moving variance) over a window.
member RollingVar(
windowSize: Dur,
?minPeriod: int,
?weights: float[],
?center: bool,
?ddof: byte
) : SeriesParameters
| Name | Type | Description |
|---|---|---|
windowSize | Dur | The size of the window formatted as a string duration. Examples: "3i" (3 index rows), "1d" (1 day), "1h" (1 hour). |
minPeriod | int (optional) | The minimum number of observations in the window required to have a value (otherwise null). |
weights | float[] (optional) | Optional weights to apply to the window. The length of the array should match the window size (if using fixed row windows). Default is null (unweighted). |
center | bool (optional) | If true, the window is centered on the current observation. Default is false (right-aligned window, [i-window, i]). |
ddof | byte (optional) | - |
Returns: A new Series with the rolling variance.
RollingVarBy
Apply a rolling variance (moving variance) over a dynamic window defined by the values in the by column.
Unlike standard fixed-size rolling windows (which operate on row counts), this operates on values (typically time).
member RollingVarBy(
windowSize: Dur,
by: Expr,
?closed: ClosedInterval,
?minPeriod: int,
?ddof: byte
) : SeriesParameters
| Name | Type | Description |
|---|---|---|
windowSize | Dur | The size of the dynamic window. Supported duration strings: "1d", "2h", "10s", "500ms", etc. |
by | Expr | The column used to define the window (the "time" axis). Typically a Date or DateTime column, but can also be monotonic integers. |
closed | ClosedInterval (optional) | Defines how the window interval is closed. Default is ClosedWindow.Left``[t - window, t). |
minPeriod | int (optional) | The minimum number of observations in the window required to have a non-null result. |
ddof | byte (optional) | “Delta Degrees of Freedom”: the divisor used in the calculation is N - ddof, where N represents the number of elements. By default ddof is 1. |
Returns: A new series representing the dynamic rolling variance.
NOTE
The by column must be sorted in ascending order.
Round
Round to given decimals.
member Round(decimals: uint32, ?mode: RoundMode) : SeriesParameters
| Name | Type | Description |
|---|---|---|
decimals | uint32 | - |
mode | RoundMode (optional) | - |
RoundSigFigs
Round to given significant figures.
member RoundSigFigs(digits: int) : SeriesParameters
| Name | Type | Description |
|---|---|---|
digits | int | - |
SampleFrac
Sample a fraction of the Series elements.
member SampleFrac(
fraction: Expr,
?withReplacement: bool,
?shuffle: bool,
?seed: uint64
) : SeriesParameters
| Name | Type | Description |
|---|---|---|
fraction | Expr | - |
withReplacement | bool (optional) | - |
shuffle | bool (optional) | - |
seed | uint64 (optional) | - |
SampleN
Sample ‘n’ elements from this Series.
member SampleN(
?n: Expr,
?withReplacement: bool,
?shuffle: bool,
?seed: uint64
) : SeriesParameters
| Name | Type | Description |
|---|---|---|
n | Expr (optional) | - |
withReplacement | bool (optional) | - |
shuffle | bool (optional) | - |
seed | uint64 (optional) | - |
SearchSorted
Find indices where elements should be inserted to maintain order (Binary Search).
member SearchSorted(element: Expr, ?side: SearchSortedSide, ?descending: bool) : int optionParameters
| Name | Type | Description |
|---|---|---|
element | Expr | The element expression to insert/search. |
side | SearchSortedSide (optional) | The insertion side (Any, Left, Right). Default is Any. |
descending | bool (optional) | Whether the target column is sorted in descending order. Default is false. |
SetSorted
Flags the Series as ‘sorted’. Enables downstream code to user fast paths for sorted arrays.
member SetSorted(?descending: bool) : SeriesParameters
| Name | Type | Description |
|---|---|---|
descending | bool (optional) | If the Series order is descending. |
Shift
Shift the values by a given period.
Shift by 1.
member Shift(n: int64) : Series
member Shift(n: int) : Series
member Shift : unit -> SeriesParameters
| Name | Type | Description |
|---|---|---|
n | int64 | - |
Show
Print the Series to Console.
member Show : unit -> unitShrinkToFit
Shrink Series memory usage.
member ShrinkToFit : unit -> SeriesReturns: A new Series
ShrinkToFitInplace
Shrink Series memory usage.This won't return a new Series
member ShrinkToFitInplace : unit -> unitSign
Element-wise sign.
member Sign : unit -> SeriesSin
Compute the element-wise sine.
member Sin : unit -> SeriesSinh
Compute the element-wise hyperbolic sine.
member Sinh : unit -> SeriesSkew
Get the Skew.
member Skew(?bias: bool) : float optionParameters
| Name | Type | Description |
|---|---|---|
bias | bool (optional) | If False, the calculations are corrected for statistical bias. |
Slice
Slice the Series. Returns a new Series.
member Slice(offset: int64, ?length: uint64) : SeriesParameters
| Name | Type | Description |
|---|---|---|
offset | int64 | Start index. |
length | uint64 (optional) | Length of the slice. |
Sort
Sort this Series. Returns a new Series.
member Sort(
?descending: bool,
?nullsLast: bool,
?maintainOrder: bool,
?multithreaded: bool
) : SeriesParameters
| Name | Type | Description |
|---|---|---|
descending | bool (optional) | Sort in descending order (default: false). |
nullsLast | bool (optional) | Place null values last (default: false). |
maintainOrder | bool (optional) | Maintain the order of equal elements (Stable sort) (default: false). |
multithreaded | bool (optional) | Use multiple threads (default: true). |
Sqrt
Square root.
member Sqrt : unit -> SeriesStd
Get the standard deviation.
member Std(?ddof: byte) : 'T optionParameters
| Name | Type | Description |
|---|---|---|
ddof | byte (optional) | Delta Degrees of Freedom. Default is 1. |
Returns: A new Series containing the Std (length 1).
Sub
Subtract two Series.
member Sub(other: Series) : SeriesParameters
| Name | Type | Description |
|---|---|---|
other | Series | - |
Sum
Compute the sum of the elements in this series.
member Sum : unit -> Series
member Sum : unit -> 'T optionTake
LINQ-like alias for Gather.
Take elements by physical integer indices. Note: Negative indices are not supported. All values must be >= 0.
member Take(indices: Expr) : Series
member Take(indices: Series) : SeriesParameters
| Name | Type | Description |
|---|---|---|
indices | Expr / Series | - |
Tan
Compute the element-wise tangent.
member Tan : unit -> SeriesTanh
Compute the element-wise hyperbolic tangent.
member Tanh : unit -> SeriesToArray
Converts the Series to a managed array.
member ToArray : unit -> 'T[]ToArrayOption
Converts the Series to a managed array with optional null values.
member ToArrayOption : unit -> 'T option[]ToArrow
Converts the Series to an Arrow array.
member ToArrow : unit -> IArrowArrayToDataFrame
Converts this Series into a single-column DataFrame.
member ToDataFrame : unit -> DataFrameToDummies
Get dummy/indicator variables.
member ToDummies(?separator: string, ?dropFirst: bool, ?dropNulls: bool) : DataFrameParameters
| Name | Type | Description |
|---|---|---|
separator | string (optional) | Separator/delimiter used when generating column names. |
dropFirst | bool (optional) | Remove the first category from the variable being encoded. |
dropNulls | bool (optional) | If there are None values in the series, a null column is not generated. Null values in the input are represented by zero vectors. |
ToFrame
Converts the Series to a DataFrame.
member ToFrame : unit -> DataFrameToHtml
Generates a rich HTML table representation of the Series by delegating to a single-column DataFrame preview.
member ToHtml : unit -> stringReturns: An HTML string representing the Series preview.
ToListOption
Get values as a list (forces evaluation).
member ToListOption : unit -> 'T option listToPhysical
Cast to physical representation of the logical dtype.
member ToPhysical : unit -> SeriesToSeqOption
Convert Series to a typed sequence of Options. Uses high-performance Arrow reader (Zero-Copy). Supports: Primitives, String, DateTime, DateOnly, TimeOnly, List, Struct.
member ToSeqOption : unit -> seq<'T option>TopK
Get the k largest elements. Result is sorted descending.
member TopK(k: int) : SeriesParameters
| Name | Type | Description |
|---|---|---|
k | int | - |
TopKBy
Get top k elements of this Series, sorted by another Series.
Get top k elements of this Series, sorted by another Expr.
member TopKBy(k: int, by: Series, ?reverse: bool) : Series
member TopKBy(k: int, by: Expr, ?reverse: bool) : Series
member TopKBy(k: int, by: seq<'b>, ?reverse: seq<bool>) : SeriesParameters
| Name | Type | Description |
|---|---|---|
k | int | - |
by | Series / Expr / seq<'b> | - |
reverse | bool (optional) / seq<bool> (optional) | - |
Truediv
True division (float result).
True division (scalar).
member Truediv(other: Series) : Series
member Truediv(other: float) : SeriesParameters
| Name | Type | Description |
|---|---|---|
other | Series / float | - |
Truncate
Truncate the given Series to the given number of decimals.
member Truncate(?decimals: uint32) : SeriesParameters
| Name | Type | Description |
|---|---|---|
decimals | uint32 (optional) | - |
TryGetValue
Gets the value at the specified index as a ValueOption ('T voption).
member TryGetValue(index: int64) : 'T voptionParameters
| Name | Type | Description |
|---|---|---|
index | int64 | The 64-bit row index location. |
Returns: ValueSome value if valid, or ValueNone if null.
Unique
Get unique values of this series.
member Unique(?maintainOrder: bool) : SeriesParameters
| Name | Type | Description |
|---|---|---|
maintainOrder | bool (optional) | Maintain order of data. This requires more work. |
UniqueCounts
Return a count of the unique values in the order of appearance.
member UniqueCounts : unit -> SeriesHandleUnnest
Unnest a Struct column into a DataFrame. Shortcut for SeriesStructOps.Unnest.
member Unnest : unit -> DataFrameUpperBound
Return the upper bound of this Series’ dtype as a unit Series.
member UpperBound : unit -> SeriesValueCounts
Count the occurrences of unique values. Similar to SQL GROUP BY val COUNT(*).
member ValueCounts(
?sort: bool,
?paralleling: bool,
?name: string,
?normalize: bool
) : DataFrameParameters
| Name | Type | Description |
|---|---|---|
sort | bool (optional) | Sort the output by count in descending order. Default is true. |
paralleling | bool (optional) | Execute in parallel. Default is true. |
name | string (optional) | The name of the count column. Default is "count". |
normalize | bool (optional) | If true, the count column will contain probabilities instead of counts. Default is false. |
Var
Get the variance.
member Var(?ddof: byte) : 'T optionParameters
| Name | Type | Description |
|---|---|---|
ddof | byte (optional) | Delta Degrees of Freedom. Default is 1. |
Returns: A new Series containing the Var (length 1).
ZipWith
Take values from self or other based on the given mask. Where mask evaluates true, take values from self. Where mask evaluates false, take values from other.
member ZipWith(mask: Series, other: Series) : SeriesParameters
| Name | Type | Description |
|---|---|---|
mask | Series | Boolean Series. |
other | Series | Series of same type. |
Returns: Series
Pipeline Module Functions (Series.*)
Series.append
Appends the Series to another Series.
Series.append : other: Series -> self: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
other | Series | - |
self | Series | - |
Series.backwardFill
Backward-fills null values up to an consecutive limit.
Series.backwardFill : limit: int -> series: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
limit | int | - |
series | Series | - |
Series.bottomK
Get the bottom K values from the Series.
Series.bottomK : k: int -> series: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
k | int | - |
series | Series | - |
Series.cast
Cast a series to a specific Polars DataType.
Series.cast : dtype: DataType -> s: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
dtype | DataType | The target Polars DataType. |
s | Series | The source Series. |
Series.castWithNetType
Cast a series to a specific .NET type.
Series.castWithNetType : s: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
s | Series | The source Series. |
Series.choose
Applies a function to each element of the Series, returning a new Series comprised of the results for each element where the function returns Some. The return DataType is inferred automatically from 'U.
Series.choose : chooser: ('T -> 'U voption) -> series: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
chooser | ('T -> 'U voption) | - |
series | Series | - |
Series.chooseSpan
Applies a function to each element of the Series, returning a new Series containing only the elements for which the function returns Some.
Series.chooseSpan : chooser: ('T -> 'U voption) -> series: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
chooser | ('T -> 'U voption) | The function to apply to each element. |
series | Series | The input Series. |
Returns: A new Series containing only the elements for which the function returns Some.
Series.clamp
Clamps series values between scalar bounds.
Series.clamp : lowerBound: 'T -> upperBound: 'T -> series: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
lowerBound | 'T | - |
upperBound | 'T | - |
series | Series | - |
Series.contains
Returns true if the Series contains the given value.
Series.contains : value: 'T -> series: Series -> boolParameters
| Name | Type | Description |
|---|---|---|
value | 'T | - |
series | Series | - |
Series.dateRange
Generate a date range.
Series.dateRange : name: string -> start: DateOnly -> endRange: DateOnly -> interval: Dur -> closed: ClosedInterval -> SeriesParameters
| Name | Type | Description |
|---|---|---|
name | string | - |
start | DateOnly | Lower bound of the date range. |
endRange | DateOnly | - |
interval | Dur | Interval of the range periods, “1w2d” # 1 week, 2 days.Default is 1 day. |
closed | ClosedInterval | Define which sides of the range are closed |
Returns: Series of data type Date
Series.datetimeRange
Converts a datetime range expression to a Series with the specified name.
Series.datetimeRange : name: string -> start: DateTime -> endRange: DateTime -> interval: Dur -> closed: ClosedInterval -> unit: TimeUnit -> timeZone: string option -> SeriesParameters
| Name | Type | Description |
|---|---|---|
name | string | Name of the resulting Series. |
start | DateTime | Start datetime of the range. |
endRange | DateTime | End datetime of the range. |
interval | Dur | Interval between datetime values. |
closed | ClosedInterval | Closed window of the range. |
unit | TimeUnit | Time unit of the resulting Datetime data type. |
timeZone | string option | Time zone of the resulting Datetime data type. |
Series.diff
Calculate the difference with a given period.
Series.diff : offset: int -> series: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
offset | int | - |
series | Series | - |
Series.dot
Compute the dot/inner product between two Series.
Series.dot : other: Series -> s: Series -> 'T optionParameters
| Name | Type | Description |
|---|---|---|
other | Series | - |
s | Series | - |
Series.dropNans
Drops NaN values from the Series.
Series.dropNans : series: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
series | Series | - |
Series.dropNulls
Drops null values from the Series.
Series.dropNulls : series: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
series | Series | - |
Series.exists
Tests if any element of the Series satisfies the given predicate, short-circuiting on the first match.
Series.exists : predicate: ('T -> bool) -> series: Series -> boolParameters
| Name | Type | Description |
|---|---|---|
predicate | ('T -> bool) | - |
series | Series | - |
Series.existsSeries
Tests if any element satisfies the boolean predicate using native Rust engine execution.
Series.existsSeries : predicate: Series -> series: Series -> boolParameters
| Name | Type | Description |
|---|---|---|
predicate | Series | - |
series | Series | - |
Series.explode
Explode a list column into multiple rows. The resulting Series will be longer than the original.
Series.explode : series: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
series | Series | - |
Series.fillNan
Fills floating-point NaN values with a float (double) literal. Default floating-point pipeline operator.
Series.fillNan : fillValue: float -> series: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
fillValue | float | - |
series | Series | - |
Series.fillNanExpr
Fills floating-point NaN values using an expression.
Series.fillNanExpr : expr: Expr -> series: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
expr | Expr | - |
series | Series | - |
Series.fillNanSingle
Fills floating-point NaN values with a float32 (single) literal.
Series.fillNanSingle : fillValue: float32 -> series: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
fillValue | float32 | - |
series | Series | - |
Series.fillNanWith
Fills floating-point NaN values with values from another Series.
Series.fillNanWith : fillSeries: Series -> series: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
fillSeries | Series | - |
series | Series | - |
Series.fillNull
Fills null values with a scalar literal using SRTP.
Series.fillNull : value: 'T -> series: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
value | 'T | - |
series | Series | - |
Series.fillNull$W
Series.fillNull$W : op_Dollar: (LitMechanism -> ('T -> Expr)) -> value: 'T -> series: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
op_Dollar | (LitMechanism -> ('T -> Expr)) | - |
value | 'T | - |
series | Series | - |
Series.fillNullExpr
Fills null values using a dynamic expression.
Series.fillNullExpr : expr: Expr -> series: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
expr | Expr | - |
series | Series | - |
Series.fillNullStrategy
Series.fillNullStrategy : strategy: FillNullStrategy -> limit: int option -> series: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
strategy | FillNullStrategy | - |
limit | int option | - |
series | Series | - |
Series.fillNullWith
Fills null values with another Series (coalesce).
Series.fillNullWith : fillSeries: Series -> series: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
fillSeries | Series | - |
series | Series | - |
Series.filter
Filter a series.
Series.filter : predicate: Series -> series: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
predicate | Series | Boolean expression used to filter the current expression. |
series | Series | The target Series. |
Series.filterWith
Filters a Series using a strongly-typed F# predicate function ('T -> bool).
Series.filterWith : predicate: ('T -> bool) -> series: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
predicate | ('T -> bool) | - |
series | Series | - |
Series.fold
Applies a function to each element of the Series threading an accumulator argument through the computation.
Series.fold : folder: ('State -> ('T -> 'State)) -> state: 'State -> series: Series -> 'StateParameters
| Name | Type | Description |
|---|---|---|
folder | ('State -> ('T -> 'State)) | A function that updates the state given the current element. |
state | 'State | The initial state. |
series | Series | The target Series. |
Returns: The accumulated state.
Series.foldSpan
Applies a function to each element of the Series using a span, without allocating a full managed array.
Series.foldSpan : folder: ('State -> ('T -> 'State)) -> state: 'State -> series: Series -> 'StateParameters
| Name | Type | Description |
|---|---|---|
folder | ('State -> ('T -> 'State)) | A function that updates the state given the current element. |
state | 'State | The initial state. |
series | Series | The target Series. |
Returns: The accumulated state.
Series.forall
Tests if all elements of the Series satisfy the given predicate, short-circuiting on the first failure.
Series.forall : predicate: ('T -> bool) -> series: Series -> boolParameters
| Name | Type | Description |
|---|---|---|
predicate | ('T -> bool) | - |
series | Series | - |
Series.forallSeries
Tests if all elements satisfy the boolean Series using native Rust engine execution.
Series.forallSeries : predicate: Series -> series: Series -> boolParameters
| Name | Type | Description |
|---|---|---|
predicate | Series | - |
series | Series | - |
Series.forwardFill
Forward-fills null values up to an consecutive limit.
Series.forwardFill : limit: int -> series: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
limit | int | - |
series | Series | - |
Series.head
Get the head value of the Series.
Series.head : series: Series -> 'TParameters
| Name | Type | Description |
|---|---|---|
series | Series | - |
Series.implode
Aggregate values into a list. Result is a Series with 1 row containing a List of all values.
Series.implode : series: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
series | Series | - |
Series.init
Creates a new Series of length n where each element is computed by calling the initializer on its row index. Idiomatic functional counterpart to Array.init / List.init.
Series.init : name: string -> n: int -> initializer: (int -> 'T) -> SeriesParameters
| Name | Type | Description |
|---|---|---|
name | string | The name of the resulting Series. |
n | int | The number of elements to create. |
initializer | (int -> 'T) | A function that computes the element at each index (0 to n - 1). |
Returns: A new Series populated with the computed elements.
Series.initUnnamed
Overload that creates an unnamed or default-named Series of length n.
Series.initUnnamed : n: int -> initializer: (int -> 'T) -> SeriesParameters
| Name | Type | Description |
|---|---|---|
n | int | - |
initializer | (int -> 'T) | - |
Series.intRange
Generate a range of integers as a series.
Series.intRange : name: string -> start: int64 -> endRange: int64 -> step: int64 -> SeriesParameters
| Name | Type | Description |
|---|---|---|
name | string | - |
start | int64 | Start of the range (inclusive). |
endRange | int64 | - |
step | int64 | Step size of the range. |
Series.interpolate
Interpolates intermediate null values linearly or using nearest neighbors.
Series.interpolate : method: InterpolationMethod -> series: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
method | InterpolationMethod | - |
series | Series | - |
Series.interpolateBy
Interpolates intermediate values guided by an independent variable series.
Series.interpolateBy : by: Series -> series: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
by | Series | - |
series | Series | - |
Series.iter
Pipeline alias for Series.Iter: ('T -> unit) -> Series -> unit.
Series.iter : action: ('T -> unit) -> series: Series -> unitParameters
| Name | Type | Description |
|---|---|---|
action | ('T -> unit) | - |
series | Series | - |
Series.iter2
Pipeline alias for Series.Iter2: ('T1 -> 'T2 -> unit) -> Series -> Series -> unit.
Series.iter2 : action: ('T1 -> ('T2 -> unit)) -> s1: Series -> s2: Series -> unitParameters
| Name | Type | Description |
|---|---|---|
action | ('T1 -> ('T2 -> unit)) | - |
s1 | Series | - |
s2 | Series | - |
Series.iter2Opt
Pipeline alias for Series.Iter2Opt: ('T1 voption -> 'T2 voption -> unit) -> Series -> Series -> unit.
Series.iter2Opt : action: ('T1 voption -> ('T2 voption -> unit)) -> s1: Series -> s2: Series -> unitParameters
| Name | Type | Description |
|---|---|---|
action | ('T1 voption -> ('T2 voption -> unit)) | - |
s1 | Series | - |
s2 | Series | - |
Series.iterOpt
Pipeline alias for Series.IterOpt: ('T voption -> unit) -> Series -> unit.
Series.iterOpt : action: ('T voption -> unit) -> series: Series -> unitParameters
| Name | Type | Description |
|---|---|---|
action | ('T voption -> unit) | - |
series | Series | - |
Series.iteri
Pipeline alias for Series.Iteri: (int64 -> 'T -> unit) -> Series -> unit.
Series.iteri : action: (int64 -> ('T -> unit)) -> series: Series -> unitParameters
| Name | Type | Description |
|---|---|---|
action | (int64 -> ('T -> unit)) | - |
series | Series | - |
Series.iteriOpt
Pipeline alias for Series.IteriOpt: (int64 -> 'T voption -> unit) -> Series -> unit.
Series.iteriOpt : action: (int64 -> ('T voption -> unit)) -> series: Series -> unitParameters
| Name | Type | Description |
|---|---|---|
action | (int64 -> ('T voption -> unit)) | - |
series | Series | - |
Series.length
Returns the length of the Series.
Series.length : series: Series -> intParameters
| Name | Type | Description |
|---|---|---|
series | Series | - |
Series.linearSpace
Converts a linear space expression to a Series with the specified name.
Series.linearSpace : name: string -> start: Expr -> endRange: Expr -> numSamples: int -> closed: ClosedInterval -> SeriesParameters
| Name | Type | Description |
|---|---|---|
name | string | Name of the resulting Series. |
start | Expr | Lower bound of the linear space. |
endRange | Expr | Upper bound of the linear space. |
numSamples | int | Number of samples to generate. |
closed | ClosedInterval | Whether the intervals are closed or open. |
Series.map
Map values of the Series using a standard F# function with automatic return DataType inference. Uses ArrowTypeResolver to map 'U to its corresponding Polars DataType.
Series.map : mapping: ('T -> 'U) -> series: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
mapping | ('T -> 'U) | The mapping function applied to each element. |
series | Series | The target Series. |
Series.map2
Builds a new Series whose elements are the results of applying the given function to the corresponding pairs of elements from the two Series. Throws ArgumentException if the two Series have different lengths. The return DataType is automatically inferred from 'V using ArrowTypeResolver.
Series.map2 : mapping: ('T -> ('U -> 'V)) -> series1: Series -> series2: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
mapping | ('T -> ('U -> 'V)) | The mapping function applied to each pair of elements. |
series1 | Series | The first input Series. |
series2 | Series | The second input Series. |
Returns: A new Series containing the transformed elements.
Series.mapOption
Map values of the Series using an F# function that handles Option values with automatic return DataType inference. Uses ArrowTypeResolver to map 'U to its corresponding Polars DataType.
Series.mapOption : mapping: ('T option -> 'U option) -> series: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
mapping | ('T option -> 'U option) | The mapping function taking and returning F# Option. |
series | Series | The target Series. |
Series.mapValueOption
Map values of the Series using an F# function that handles ValueOption with automatic return DataType inference. Uses ArrowTypeResolver to map 'U to its corresponding Polars DataType.
Series.mapValueOption : mapping: ('T voption -> 'U voption) -> series: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
mapping | ('T voption -> 'U voption) | The mapping function taking and returning F# ValueOption. |
series | Series | The target Series. |
Series.mapi
Builds a new Series whose elements are the results of applying the given function to each valid (non-null) element of the Series and its 0-based index. Null values in the input Series are preserved as Null in the output. The return DataType is automatically inferred from 'U using ArrowTypeResolver.
Series.mapi : mapping: (int -> ('T -> 'U)) -> series: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
mapping | (int -> ('T -> 'U)) | A function that transforms the 0-based index and current element into a new value. |
series | Series | The target Series. |
Returns: A new Series containing the transformed elements with nulls preserved.
Series.mapi2
Builds a new Series whose elements are the results of applying the given function to the 0-based index and corresponding pairs of elements from the two Series. Throws ArgumentException if the two Series have different lengths. The return DataType is automatically inferred from 'V using ArrowTypeResolver.
Series.mapi2 : mapping: (int -> ('T -> ('U -> 'V))) -> series1: Series -> series2: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
mapping | (int -> ('T -> ('U -> 'V))) | The mapping function applied to index and each pair of elements. |
series1 | Series | The first input Series. |
series2 | Series | The second input Series. |
Returns: A new Series containing the transformed elements.
Series.mapiOption
Builds a new Series whose elements are the results of applying the given function to each optional element and its 0-based index.
Series.mapiOption : mapping: (int -> ('T option -> 'U option)) -> series: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
mapping | (int -> ('T option -> 'U option)) | A function that transforms the 0-based index and current option element. |
series | Series | The target Series. |
Returns: A new Series containing the transformed elements.
Series.mapiValueOption
Builds a new Series whose elements are the results of applying the given function to each value-optional element and its 0-based index.
Series.mapiValueOption : mapping: (int -> ('T voption -> 'U voption)) -> series: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
mapping | (int -> ('T voption -> 'U voption)) | A function that transforms the 0-based index and current value-option element. |
series | Series | The target Series. |
Returns: A new Series containing the transformed elements.
Series.ofArray2D
Create a FixedSizeList Series from a 2D Array (Matrix). Shape: [Rows, Width] -> Array[Width] Supported Types: Primitives, Decimal, Int128
Series.ofArray2D : data: 'T[,] -> SeriesParameters
| Name | Type | Description |
|---|---|---|
data | 'T[,] | - |
Series.ofArray2DNamed
Create a named FixedSizeList Series from a 2D Array (Matrix).
Series.ofArray2DNamed : name: string -> data: 'T[,] -> SeriesParameters
| Name | Type | Description |
|---|---|---|
name | string | - |
data | 'T[,] | - |
Series.ofSeq
Create a Series from a sequence of values.
Series.ofSeq : data: seq<'T> -> SeriesParameters
| Name | Type | Description |
|---|---|---|
data | seq<'T> | - |
Series.ofSeqNamed
Create a named Series from a sequence of values.
Series.ofSeqNamed : name: string -> data: seq<'T> -> SeriesParameters
| Name | Type | Description |
|---|---|---|
name | string | - |
data | seq<'T> | - |
Series.oneCreate
Creates a new Series of length n filled with the one value of type 'T.
Series.oneCreate : n: int -> SeriesParameters
| Name | Type | Description |
|---|---|---|
n | int | The length of the resulting Series. |
Returns: A new Series filled with typed ones.
Series.pairwiseMap
Applies a function to each pair of adjacent elements (x_i, x_{i+1}), yielding a Series of length (N - 1).
Series.pairwiseMap : mapping: ('T -> ('T -> 'U)) -> series: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
mapping | ('T -> ('T -> 'U)) | - |
series | Series | - |
Series.rechunk
Rechunk the Series to ensure it is contiguous.
Series.rechunk : series: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
series | Series | The target Series. |
Series.reduce
Reduces the elements of the Series using the specified reduction function without array allocation. Throws an InvalidOperationException if the Series is empty.
Series.reduce : reduction: ('T -> ('T -> 'T)) -> series: Series -> 'TParameters
| Name | Type | Description |
|---|---|---|
reduction | ('T -> ('T -> 'T)) | The reduction function. |
series | Series | The target Series. |
Returns: The reduced value.
Series.rename
Renames the Series.
Series.rename : name: string -> series: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
name | string | - |
series | Series | - |
Series.replace
Replace values in the series using replacement expressions.
Series.replace : old: Expr -> newExpr: Expr -> series: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
old | Expr | The expression or series identifying values to replace. |
newExpr | Expr | The expression or series containing replacement values. |
series | Series | The target Series. |
Returns: A new Series with replaced values.
Series.replaceScalar
Replace scalar values in the series using SRTP literals.
Series.replaceScalar : oldVal: 'Old -> newVal: 'New -> series: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
oldVal | 'Old | - |
newVal | 'New | - |
series | Series | - |
Series.replaceScalar$W
Series.replaceScalar$W : op_Dollar: (LitMechanism -> ('Old -> Expr)) -> op_Dollar1: (LitMechanism -> ('New -> Expr)) -> oldVal: 'Old -> newVal: 'New -> series: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
op_Dollar | (LitMechanism -> ('Old -> Expr)) | - |
op_Dollar1 | (LitMechanism -> ('New -> Expr)) | - |
oldVal | 'Old | - |
newVal | 'New | - |
series | Series | - |
Series.replaceStrict
Strictly replace values in the series. Throws an error if unmatched unless defaultExpr is provided.
Series.replaceStrict : old: Expr -> newExpr: Expr -> defaultExpr: Expr option -> returnDataType: DataTypeExpr option -> series: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
old | Expr | - |
newExpr | Expr | - |
defaultExpr | Expr option | - |
returnDataType | DataTypeExpr option | - |
series | Series | - |
Series.replicate
Creates a new Series of length n filled with a specified scalar constant.
Series.replicate : n: int -> value: 'T -> SeriesParameters
| Name | Type | Description |
|---|---|---|
n | int | The length of the resulting Series. |
value | 'T | The constant scalar value. |
Returns: A new Series repeating the scalar value.
Series.replicate$W
Series.replicate$W : op_Dollar: (LitMechanism -> ('T -> Expr)) -> n: int -> value: 'T -> SeriesParameters
| Name | Type | Description |
|---|---|---|
op_Dollar | (LitMechanism -> ('T -> Expr)) | - |
n | int | - |
value | 'T | - |
Series.replicateFromIndex
Creates a new Series of the specified length filled with the value at the given index.
Series.replicateFromIndex : index: int -> length: int -> series: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
index | int | The 0-based index of the value to replicate. |
length | int | The length of the newly created Series. |
series | Series | The source Series. |
Returns: A new Series filled with the replicated value.
Series.reshape
Reshape this Series to a flat Series or an Array Series.
Series.reshape : shape: seq<int64> -> s: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
shape | seq<int64> | - |
s | Series | - |
Series.reverse
Reverse the order of the elements in the Series.
Series.reverse : s: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
s | Series | - |
Series.scan
Applies a function to each element and an accumulator, yielding a new Series of the accumulated values at each step.
Series.scan : folder: ('State -> ('T -> 'State)) -> state: 'State -> series: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
folder | ('State -> ('T -> 'State)) | The accumulation function. |
state | 'State | The initial state value. |
series | Series | The target Series. |
Returns: A new Series containing intermediate accumulated results.
Series.scanSpan
Applies a state-transition function to each element of the Series, accumulating a result.
Series.scanSpan : folder: ('State -> ('T -> 'State)) -> state: 'State -> series: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
folder | ('State -> ('T -> 'State)) | - |
state | 'State | The initial state value. |
series | Series | The target Series. |
Returns: A new Series containing intermediate accumulated results.
Series.shift
Shift the values in the Series by a given offset.
Series.shift : offset: int -> series: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
offset | int | - |
series | Series | - |
Series.show
Prints the Series to the console.
Series.show : series: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
series | Series | - |
Series.slice
Slices the Series.
Series.slice : start: int -> length: int -> series: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
start | int | - |
length | int | - |
series | Series | - |
Series.sortAscending
Sort the values in the Series in ascending order.
Series.sortAscending : series: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
series | Series | - |
Series.sortDescending
Sort the values in the Series in descending order.
Series.sortDescending : series: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
series | Series | - |
Series.tail
Get the tail value of the Series.
Series.tail : series: Series -> 'TParameters
| Name | Type | Description |
|---|---|---|
series | Series | - |
Series.timeRange
Converts a time range expression to a Series with the specified name.
Series.timeRange : name: string -> start: TimeOnly -> endRange: TimeOnly -> interval: Dur -> closed: ClosedInterval -> SeriesParameters
| Name | Type | Description |
|---|---|---|
name | string | Name of the resulting Series. |
start | TimeOnly | Start time of the range. |
endRange | TimeOnly | End time of the range. |
interval | Dur | Interval between time values. |
closed | ClosedInterval | Closed window of the range. |
Series.toArray
Convert a Series to an array.
Series.toArray : series: Series -> 'T[]Parameters
| Name | Type | Description |
|---|---|---|
series | Series | - |
Series.toArrayOption
Convert a Series to an array with optional null values.
Series.toArrayOption : series: Series -> 'T option[]Parameters
| Name | Type | Description |
|---|---|---|
series | Series | - |
Series.toArrow
Converts the Series to an Arrow array.
Series.toArrow : series: Series -> IArrowArrayParameters
| Name | Type | Description |
|---|---|---|
series | Series | The target Series. |
Series.toExpr
Convert the Series to Expr.
Series.toExpr : series: Series -> ExprParameters
| Name | Type | Description |
|---|---|---|
series | Series | - |
Series.toFrame
Converts the Series to a DataFrame with a single column.
Series.toFrame : series: Series -> DataFrameParameters
| Name | Type | Description |
|---|---|---|
series | Series | The target Series. |
Series.toSeq
Convert a Series to a sequence with optional null values.
Series.toSeq : series: Series -> seq<'T>Parameters
| Name | Type | Description |
|---|---|---|
series | Series | - |
Series.toSeqOption
Convert a Series to a sequence.
Series.toSeqOption : series: Series -> seq<'T option>Parameters
| Name | Type | Description |
|---|---|---|
series | Series | - |
Series.topK
Get the top K values from the Series.
Series.topK : k: int -> series: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
k | int | - |
series | Series | - |
Series.tryFind
Returns the first non-null element for which the given function returns true, or None if no such element is found.
Series.tryFind : predicate: ('T -> bool) -> series: Series -> 'T optionParameters
| Name | Type | Description |
|---|---|---|
predicate | ('T -> bool) | - |
series | Series | - |
Series.tryFindIndex
Returns the 0-based index of the first non-null element satisfying the predicate, or None if no such element is found.
Series.tryFindIndex : predicate: ('T -> bool) -> series: Series -> int64 optionParameters
| Name | Type | Description |
|---|---|---|
predicate | ('T -> bool) | - |
series | Series | - |
Series.tryFindV
ValueOption variant of tryFind to avoid reference-type heap allocation.
Series.tryFindV : predicate: ('T -> bool) -> series: Series -> 'T voptionParameters
| Name | Type | Description |
|---|---|---|
predicate | ('T -> bool) | - |
series | Series | - |
Series.tryHead
Try to get the head value of the Series.
Series.tryHead : series: Series -> 'T optionParameters
| Name | Type | Description |
|---|---|---|
series | Series | - |
Series.tryHeadOrDefault
Try to get the head value of the Series with a default value.
Series.tryHeadOrDefault : defaultValue: 'T -> series: Series -> 'TParameters
| Name | Type | Description |
|---|---|---|
defaultValue | 'T | - |
series | Series | - |
Series.tryHeadV
Try to get the head value of the Series as a value option.
Series.tryHeadV : series: Series -> 'T voptionParameters
| Name | Type | Description |
|---|---|---|
series | Series | - |
Series.tryTail
Try to get the tail value of the Series.
Series.tryTail : series: Series -> 'T optionParameters
| Name | Type | Description |
|---|---|---|
series | Series | - |
Series.tryTailOrDefault
Try to get the tail value of the Series with a default value.
Series.tryTailOrDefault : defaultValue: 'T -> series: Series -> 'TParameters
| Name | Type | Description |
|---|---|---|
defaultValue | 'T | - |
series | Series | - |
Series.tryTailV
Try to get the tail value of the Series as a value option.
Series.tryTailV : series: Series -> 'T voptionParameters
| Name | Type | Description |
|---|---|---|
series | Series | - |
Series.unfold
Generates a new Series from a state-transition function, up to a maximum length. Emits None to terminate sequence generation early.
Series.unfold : generator: ('State -> ('T * 'State) voption) -> initialState: 'State -> maxLen: int -> name: string -> SeriesParameters
| Name | Type | Description |
|---|---|---|
generator | ('State -> ('T * 'State) voption) | - |
initialState | 'State | - |
maxLen | int | - |
name | string | - |
Series.unique
Returns the unique values of the Series.
Series.unique : series: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
series | Series | - |
Series.uniqueWithOrder
Returns the unique values of the Series with the order maintained.
Series.uniqueWithOrder : series: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
series | Series | - |
Series.unnest
Unnest a Struct series into a DataFrame. Shortcut for SeriesStructOps.Unnest.
Series.unnest : series: Series -> DataFrameParameters
| Name | Type | Description |
|---|---|---|
series | Series | - |
Series.zeroCreate
Creates a new Series of length n filled with the zero value of type 'T.
Series.zeroCreate : n: int -> SeriesParameters
| Name | Type | Description |
|---|---|---|
n | int | The length of the resulting Series. |
Returns: A new Series filled with typed zeros.
Series.zip
Combines two Series into an array of paired tuples (traditional functional zip). Truncates to the length of the shorter Series if lengths differ.
Series.zip : other: Series -> self: Series -> ('T voption * 'U voption)[]Parameters
| Name | Type | Description |
|---|---|---|
other | Series | The second Series. |
self | Series | The first Series. |
Returns: An array containing element-wise tuples ('T * 'U).
Series.zipWith
Take values from self or other based on the given mask. Where mask evaluates true, take values from self. Where mask evaluates false, take values from other.
Series.zipWith : mask: Series -> other: Series -> self: Series -> SeriesParameters
| Name | Type | Description |
|---|---|---|
mask | Series | - |
other | Series | - |
self | Series | - |