Skip to content

Series ​

Namespace: Polars.FSharp

An eager Series holding a single column of data.

Sub-namespaces ​

Sub-namespacePageDescription
.ArraySeries.ArrayAccess array (fixed-size list) operations.
.BinSeries.BinAccess binary operations.
.CatSeries.CatAccess categorical operations.
.DtSeries.DtAccess temporal (Date/Time) operations.
.ExtSeries.ExtAccess extension datatypes operations.
.ListSeries.ListAccess list operations.
.StrSeries.StrAccess string manipulation operations.
.StructSeries.StructAccess struct operations.

Properties & Indexers ​

PropertyTypeDescription
DataTypeDataTypeGet the DataType of the Series.
DtypeStrstringGet the string representation of the Series Data Type (e.g., "Int64", "String").
IsContiguousboolDetermines if the Series memory is physically contiguous (i.e., consists of a single chunk).
Lengthint64-
NChunksint64Gets the number of underlying Arrow memory chunks.
Namestring-
NullCountint64Get the number of null values in the Series. This is an O(1) operation (metadata access).
Shapeint64[]Shape of this Series. In Polars, a Series is always 1D, so this returns an array of length 1.
SortedFlagsSortStateFlagsGets 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.

fsharp
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>) : Series

Parameters

NameTypeDescription
namestring-
dataReadOnlySpan<'T> / seq<'T>-

ofExpr ​

Create Series From single column expression.

fsharp
static member ofExpr(expr: Expr) : Series

Parameters

NameTypeDescription
exprExpr-

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)]).

fsharp
static member ofTensor(name: string, tensor: ReadOnlyTensorSpan<'T>) : Series

Parameters

NameTypeDescription
namestringThe column name for the newly created Series.
tensorReadOnlyTensorSpan<'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.

fsharp
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) : Series

Parameters

NameTypeDescription
lhsSeries-
rhsSeries / int / float / int64 / float32 / string / TimeSpan / decimal / bool-

op_BangEquals ​

fsharp
static member op_BangEquals(lhs: Series, rhs: Series) : Series

Parameters

NameTypeDescription
lhsSeries-
rhsSeries-

( ! ) Logical NOT ​

fsharp
static member op_Dereference(s: Series) : Series

Parameters

NameTypeDescription
sSeries-

( / ) Division ​

fsharp
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) : Series

Parameters

NameTypeDescription
lhsSeries-
rhsSeries / int / int64 / float / float32 / decimal-

op_DotAt ​

fsharp
static member op_DotAt(s1: Series, s2: Series) : Series

Parameters

NameTypeDescription
s1Series-
s2Series-

( .!= ) Not Equal ​

fsharp
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) : Series

Parameters

NameTypeDescription
lhsSeries-
rhsint / int64 / string / float / float32 / DateTime / TimeOnly / DateOnly / TimeSpan / decimal / bool-

op_DotEquals ​

fsharp
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) : Series

Parameters

NameTypeDescription
lhsSeries-
rhsSeries / int / int64 / float / string / float32 / DateTime / TimeOnly / DateOnly / TimeSpan / decimal / bool-

( .> ) Greater Than ​

fsharp
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) : Series

Parameters

NameTypeDescription
lhsSeries-
rhsSeries / int / int64 / float / float32 / DateTime / TimeOnly / DateOnly / TimeSpan / decimal / string-

( .>= ) Greater Or Equal ​

fsharp
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) : Series

Parameters

NameTypeDescription
lhsSeries-
rhsSeries / int / int64 / float / float32 / DateTime / TimeOnly / DateOnly / TimeSpan / decimal / string-

( .< ) Less Than ​

fsharp
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) : Series

Parameters

NameTypeDescription
lhsSeries-
rhsSeries / int / int64 / float / float32 / DateTime / TimeOnly / DateOnly / TimeSpan / decimal / string-

( .<= ) Less Or Equal ​

fsharp
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) : Series

Parameters

NameTypeDescription
lhsSeries-
rhsSeries / 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.

fsharp
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) : Series

Parameters

NameTypeDescription
lhsSeries-
rhsSeries / float32 / int64-

( <<< ) Left Shift ​

fsharp
static member op_LeftShift(lhs: Series, rhs: int) : Series

Parameters

NameTypeDescription
lhsSeries-
rhsint-

( ~~~ ) Bitwise NOT ​

fsharp
static member op_LogicalNot(s: Series) : Series

Parameters

NameTypeDescription
sSeries-

( % ) Modulus ​

fsharp
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) : Series

Parameters

NameTypeDescription
lhsSeries-
rhsSeries / int / int64-

( * ) Multiply ​

fsharp
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) : Series

Parameters

NameTypeDescription
lhsSeries-
rhsSeries / int / int64 / float / float32 / decimal-

( >>> ) Right Shift ​

fsharp
static member op_RightShift(lhs: Series, rhs: int) : Series

Parameters

NameTypeDescription
lhsSeries-
rhsint-

( - ) Subtraction ​

fsharp
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) : Series

Parameters

NameTypeDescription
lhsSeries-
rhsSeries / int / float / int64 / float32 / TimeSpan / decimal-

Instance Methods ​

Abs ​

Absolute value.

fsharp
member Abs : unit -> Series

Add ​

Add two Series.

fsharp
member Add(other: Series) : Series

Parameters

NameTypeDescription
otherSeries-

All ​

Compute the bitwise XOR of the elements in this series.

fsharp
member All(?ignoreNulls: bool) : bool option

Parameters

NameTypeDescription
ignoreNullsbool (optional)-

Any ​

Compute the bitwise XOR of the elements in this series.

fsharp
member Any(?ignoreNulls: bool) : bool option

Parameters

NameTypeDescription
ignoreNullsbool (optional)-

Append ​

Append a Series to this one. The resulting series will consist of multiple chunks.

fsharp
member Append(other: Series) : Series

Parameters

NameTypeDescription
otherSeriesSeries to append.

AppendInplace ​

Appends another Series to this one in-place, mutating the underlying chunks. Returns unit to indicate side-effects.

fsharp
member AppendInplace(other: Series) : unit

Parameters

NameTypeDescription
otherSeriesSeries to append.

ApproxNUnique ​

Get an approximation of the number of unique values in this Series. Uses HyperLogLog algorithm for fast, memory-efficient counting.

fsharp
member ApproxNUnique : unit -> int64

Returns: Approximate count of unique values.


ArcCos ​

Compute the element-wise inverse cosine.

fsharp
member ArcCos : unit -> Series

ArcCosh ​

Compute the element-wise inverse hyperbolic cosine.

fsharp
member ArcCosh : unit -> Series

ArcSin ​

Compute the element-wise inverse sine.

fsharp
member ArcSin : unit -> Series

ArcSinh ​

Compute the element-wise inverse hyperbolic sine.

fsharp
member ArcSinh : unit -> Series

ArcTan ​

Compute the element-wise inverse tangent.

fsharp
member ArcTan : unit -> Series

ArcTanh ​

Compute the element-wise inverse hyperbolic tangent.

fsharp
member ArcTanh : unit -> Series

ArgMax ​

Compute the index of the maximum value of the elements in this series.

fsharp
member ArgMax : unit -> int64 option

ArgMin ​

Compute the index of the minimum value of the elements in this series.

fsharp
member ArgMin : unit -> int64 option

ArgSort ​

Get the index values that would sort this expression.

fsharp
member ArgSort(?descending: bool, ?nullsLast: bool) : Series

Parameters

NameTypeDescription
descendingbool (optional)If true, sort in descending order. Default is false.
nullsLastbool (optional)If true, place null values last. Default is false.

ArgTrue ​

Get index values where Boolean Series evaluate True.

fsharp
member ArgTrue : unit -> Series

Returns: Series of data type UInt32.


ArgUnique ​

Get the index of the unique values.

fsharp
member ArgUnique : unit -> Series

As ​

Returns a zero-allocation struct enumerator for strongly-typed iteration. Usage: for v in series.As{int}() do ...

fsharp
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.

fsharp
member AsDangerousUnmanagedTensor : unit -> (IntPtr * int64[])
member AsDangerousUnmanagedTensor(shape: ReadOnlySpan<IntPtr>) : (IntPtr * int64[])

Parameters

NameTypeDescription
shapeReadOnlySpan<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

fsharp
member AsPolarsQueryable : unit -> IQueryable<'T>
member AsPolarsQueryable(sample: seq<'T>) : IQueryable<'T>

Parameters

NameTypeDescription
sampleseq<'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

fsharp
member AsQueryable : unit -> IQueryable<'T>
member AsQueryable(sample: seq<'T>) : IQueryable<'T>

Parameters

NameTypeDescription
sampleseq<'T>-

AsReadOnlySpan ​

Generate zero-copy ReadOnlySpan from a numeric Series.

fsharp
member AsReadOnlySpan : unit -> ReadOnlySpan<'T>

AsSeq ​

Explicitly transitions the Series to a managed sequence ('T seq) for client-side evaluation.

fsharp
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.

fsharp
member AsTensor : unit -> Tensor<'T>
member AsTensor(shape: ReadOnlySpan<IntPtr>) : Tensor<'T>

Parameters

NameTypeDescription
shapeReadOnlySpan<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).

fsharp
member AsTensorSpan : unit -> ReadOnlyTensorSpan<'T>
member AsTensorSpan(shape: ReadOnlySpan<IntPtr>) : ReadOnlyTensorSpan<'T>

Parameters

NameTypeDescription
shapeReadOnlySpan<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.

fsharp
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.

fsharp
member BackwardFill(?limit: int) : Series

Parameters

NameTypeDescription
limitint (optional)Max number of consecutive nulls to fill.

BitLeftShift ​

Bitwise left shift.

fsharp
member BitLeftShift(n: int) : Series

Parameters

NameTypeDescription
nint-

BitRightShift ​

Bitwise right shift.

fsharp
member BitRightShift(n: int) : Series

Parameters

NameTypeDescription
nint-

BitwiseAnd ​

Compute the bitwise AND of the elements in this series.

fsharp
member BitwiseAnd : unit -> Series
member BitwiseAnd : unit -> 'T option

BitwiseCountOnes ​

Get the number of set bits (1s) in the binary representation of the integer.

fsharp
member BitwiseCountOnes : unit -> Series

BitwiseCountZeros ​

Get the number of unset bits (0s) in the binary representation of the integer.

fsharp
member BitwiseCountZeros : unit -> Series

BitwiseLeadingOnes ​

Get the number of leading unset bits (0s) in the binary representation of the integer.

fsharp
member BitwiseLeadingOnes : unit -> Series

BitwiseLeadingZeros ​

Get the number of leading set bits (1s) in the binary representation of the integer.

fsharp
member BitwiseLeadingZeros : unit -> Series

BitwiseOr ​

Compute the bitwise OR of the elements in this series.

fsharp
member BitwiseOr : unit -> Series
member BitwiseOr : unit -> 'T option

BitwiseTrailingOnes ​

Get the number of trailing set bits (1s) in the binary representation of the integer.

fsharp
member BitwiseTrailingOnes : unit -> Series

BitwiseTrailingZeros ​

Get the number of trailing unset bits (0s) in the binary representation of the integer.

fsharp
member BitwiseTrailingZeros : unit -> Series

BitwiseXor ​

Compute the bitwise XOR of the elements in this series.

fsharp
member BitwiseXor : unit -> Series
member BitwiseXor : unit -> 'T option

BottomK ​

Get the k smallest elements. Result is sorted ascending.

fsharp
member BottomK(k: int) : Series

Parameters

NameTypeDescription
kint-

BottomKBy ​

Get bottom k elements of this Series, sorted by another Series.

Get bottom k elements of this Series, sorted by another Expr.

fsharp
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>) : Series

Parameters

NameTypeDescription
kint-
bySeries / Expr / seq<'a>-
reversebool (optional) / seq<bool> (optional)-

Cast ​

Cast Series to another DataType.

Cast the series to a specific .NET type.

fsharp
member Cast(dtype: DataType, ?strict: bool, ?wrapNumerical: bool) : Series
member Cast(?strict: bool, ?wrapNumerical: bool) : Series

Parameters

NameTypeDescription
dtypeDataTypeThe target type
strictbool (optional)Throws an error if conversion had overflows.
wrapNumericalbool (optional)Allows wrapping numerical overflow.

Returns: A new Series of the target type.


Cbrt ​

Cube root.

fsharp
member Cbrt : unit -> Series

Ceil ​

Round up to the nearest integer.

fsharp
member Ceil : unit -> Series

ChunkLengths ​

Get the length of each individual chunk.

fsharp
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.

fsharp
member Clear(?n: uint32) : Series

Parameters

NameTypeDescription
nuint32 (optional)-

Clip ​

Constrain the values in the Series to a given range.

Set values outside bounds to scalar boundary values.

fsharp
member Clip(?lowerBound: Expr, ?upperBound: Expr) : Series
member Clip(lowerBound: 'T, upperBound: 'T) : Series

Parameters

NameTypeDescription
lowerBoundExpr (optional) / 'TLower bound expression.
upperBoundExpr (optional) / 'TUpper bound expression.

Returns: Series with values constrained to the given range.


Clip$W ​

fsharp
member Clip$W(this: Series, lowerBound: 'T, upperBound: 'T) : Series

Parameters

NameTypeDescription
thisSeries-
lowerBound'T-
upperBound'T-

Clone ​

fsharp
member Clone : unit -> Series

Cos ​

Compute the element-wise cosine.

fsharp
member Cos : unit -> Series

Cosh ​

Compute the element-wise hyperbolic cosine.

fsharp
member Cosh : unit -> Series

Cot ​

Compute the element-wise value for the cotangent.

fsharp
member Cot : unit -> Series

Count ​

Compute the count of the elements in this series.

fsharp
member Count : unit -> int64

CumCount ​

Get an array with the cumulative count computed at every element.

fsharp
member CumCount(?reverse: bool) : Series

Parameters

NameTypeDescription
reversebool (optional)Reverse the operation.

CumMax ​

Get an array with the cumulative max computed at every element.

fsharp
member CumMax(?reverse: bool) : Series

Parameters

NameTypeDescription
reversebool (optional)Reverse the operation.

CumMin ​

Get an array with the cumulative min computed at every element.

fsharp
member CumMin(?reverse: bool) : Series

Parameters

NameTypeDescription
reversebool (optional)Reverse the operation.

CumProd ​

Get an array with the cumulative prod computed at every element.

fsharp
member CumProd(?reverse: bool) : Series

Parameters

NameTypeDescription
reversebool (optional)Reverse the operation.

CumSum ​

Get an array with the cumulative sum computed at every element.

fsharp
member CumSum(?reverse: bool) : Series

Parameters

NameTypeDescription
reversebool (optional)Reverse the operation.

CumulativeEval ​

fsharp
member CumulativeEval(expr: Expr, ?minSamples: int) : Series

Parameters

NameTypeDescription
exprExpr-
minSamplesint (optional)-

Cut ​

Cut the series into bins based on the given breaks.

fsharp
member Cut(
    breaks: seq<float>,
    ?labels: seq<string>,
    ?leftClosed: bool,
    ?includeBreaks: bool
) : Series

Parameters

NameTypeDescription
breaksseq<float>-
labelsseq<string> (optional)-
leftClosedbool (optional)-
includeBreaksbool (optional)-

Describe ​

fsharp
member Describe : unit -> DataFrame

Diff ​

Calculate the difference with a given period.

Diff by 1.

fsharp
member Diff(n: int64) : Series
member Diff(n: int) : Series
member Diff : unit -> Series

Parameters

NameTypeDescription
nint64-

Div ​

Divide two Series.

fsharp
member Div(other: Series) : Series

Parameters

NameTypeDescription
otherSeries-

Dot ​

Compute the dot/inner product between two Series.

fsharp
member Dot(other: Series) : Series
member Dot(other: Series) : 'T option

Parameters

NameTypeDescription
otherSeries-

DropNans ​

Drop nan values.

fsharp
member DropNans : unit -> Series

DropNulls ​

Drop null values.

fsharp
member DropNulls : unit -> Series

Entropy ​

Compute the Shannon entropy of the given Series.

fsharp
member Entropy(?baseval: float, ?normalize: bool) : float option

Parameters

NameTypeDescription
basevalfloat (optional)-
normalizebool (optional)-

Eq ​

Compare two Series for equality.

fsharp
member Eq(other: Series) : Series

Parameters

NameTypeDescription
otherSeries-

EqMissing ​

Compare two Series for equality, ignoring nulls.

fsharp
member EqMissing(other: Series) : Series

Parameters

NameTypeDescription
otherSeries-

EstimatedSize ​

Return an estimation of the total (heap) allocated size of the Series. Estimated size is given in the specified unit (bytes by default).

fsharp
member EstimatedSize(unit: SizeUnit) : float

Parameters

NameTypeDescription
unitSizeUnitScale the returned size to the given unit (uses 1024 base).

Returns: The estimated size as a double.


EwmMean ​

Compute exponentially-weighted moving average.

fsharp
member EwmMean(
    alpha: float,
    ?adjust: bool,
    ?bias: bool,
    ?minPeriods: int,
    ?ignoreNulls: bool
) : Series

Parameters

NameTypeDescription
alphafloatSpecify smoothing factor alpha directly.
Constraint: 0 < alpha <= 1
adjustbool (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.
biasbool (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.
minPeriodsint (optional)Minimum number of observations in window required to have a value (otherwise result is null).
ignoreNullsbool (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.

fsharp
member EwmMeanBy(by: Expr, halfLife: string) : Series

Parameters

NameTypeDescription
byExprThe column used to determine the distance between observations.
Supported data types: Date, DateTime, UInt64, UInt32, Int64, or Int32.
halfLifestringThe unit over which an observation decays to half its value.
Supported string formats:

- Time unitsns (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.

fsharp
member EwmStd(
    alpha: float,
    ?adjust: bool,
    ?bias: bool,
    ?minPeriods: int,
    ?ignoreNulls: bool
) : Series

Parameters

NameTypeDescription
alphafloatSpecify smoothing factor alpha directly.
Constraint: 0 < alpha <= 1
adjustbool (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.
biasbool (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.
minPeriodsint (optional)Minimum number of observations in window required to have a value (otherwise result is null).
ignoreNullsbool (optional)Ignore missing values when calculating weights.

Returns: A new expression representing the EWM standard deviation.


EwmSum ​

Compute exponentially-weighted moving sum.

fsharp
member EwmSum(
    alpha: float,
    ?adjust: bool,
    ?bias: bool,
    ?minPeriods: int,
    ?ignoreNulls: bool
) : Series

Parameters

NameTypeDescription
alphafloat-
adjustbool (optional)-
biasbool (optional)-
minPeriodsint (optional)-
ignoreNullsbool (optional)-

EwmSumBy ​

Compute exponentially-weighted moving sum based on a temporal or index column.

fsharp
member EwmSumBy(by: Expr, halfLife: string) : Series

Parameters

NameTypeDescription
byExpr-
halfLifestring-

EwmVar ​

Compute exponentially-weighted moving variance.

fsharp
member EwmVar(
    alpha: float,
    ?adjust: bool,
    ?bias: bool,
    ?minPeriods: int,
    ?ignoreNulls: bool
) : Series

Parameters

NameTypeDescription
alphafloatSpecify smoothing factor alpha directly.
Constraint: 0 < alpha <= 1
adjustbool (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.
biasbool (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.
minPeriodsint (optional)Minimum number of observations in window required to have a value (otherwise result is null).
ignoreNullsbool (optional)Ignore missing values when calculating weights.

Returns: A new expression representing the EWM variance.


Exp ​

Exponential (e^x).

fsharp
member Exp : unit -> Series

Explode ​

Explode a list column into multiple rows. The resulting Series will be longer than the original.

fsharp
member Explode(?emptyAsNull: bool, ?keepNulls: bool) : Series

Parameters

NameTypeDescription
emptyAsNullbool (optional)-
keepNullsbool (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.

fsharp
member Extend(other: Series) : Series

Parameters

NameTypeDescription
otherSeriesSeries to extend the series with.

ExtendConstant ​

Extending the Series with ‘n’ copies of a value.

fsharp
member ExtendConstant(value: Expr, n: Expr) : Series

Parameters

NameTypeDescription
valueExprA constant literal value or a unit expression with which to extend the expression result Series; can pass None to extend with nulls.
nExprThe 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.

fsharp
member ExtendInplace(other: Series) : unit

Parameters

NameTypeDescription
otherSeriesSeries 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.

fsharp
member FillNan(expr: Expr) : Series
member FillNan(fillValue: float) : Series
member FillNan(fillValue: float32) : Series
member FillNan(fillValue: Series) : Series

Parameters

NameTypeDescription
exprExprThe expression providing replacement values.
fillValuefloat / float32 / SeriesThe 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.).

fsharp
member FillNull(expr: Expr) : Series
member FillNull(fillValue: 'T) : Series
member FillNull(fillValue: Series) : Series
member FillNull(strategies: FillNullStrategy, ?limit: int) : Series

Parameters

NameTypeDescription
exprExpr-
fillValue'T / Series-
strategiesFillNullStrategy-
limitint (optional)-

FillNull$W ​

fsharp
member FillNull$W(this: Series, fillValue: 'T) : Series

Parameters

NameTypeDescription
thisSeries-
fillValue'T-

Filter ​

Filter a series using a boolean series.

Filter a series using a boolean sequence.

fsharp
member Filter(predicate: Series) : Series
member Filter(predicate: seq<bool>) : Series

Parameters

NameTypeDescription
predicateSeries / seq<bool>Boolean series used to filter the current series.

Returns: A new series with filtered values.


FilterWith ​

fsharp
member FilterWith(predicate: ('T -> bool)) : Series

Parameters

NameTypeDescription
predicate('T -> bool)-

First ​

Compute the first non-null scalar value of this series.

fsharp
member First : unit -> Series
member First : unit -> 'T option

Floor ​

Round down to the nearest integer.

fsharp
member Floor : unit -> Series

FloorDiv ​

Floor division (integer result).

Floor division (scalar).

fsharp
member FloorDiv(other: Series) : Series
member FloorDiv(other: int) : Series

Parameters

NameTypeDescription
otherSeries / int-

ForwardFill ​

Fill null values with the previous non-null value.

fsharp
member ForwardFill(?limit: int) : Series

Parameters

NameTypeDescription
limitint (optional)Max number of consecutive nulls to fill.

FromArrow ​

Converts an Arrow array to a Series.

fsharp
member FromArrow(name: string, arrowArray: IArrowArray) : Series

Parameters

NameTypeDescription
namestring-
arrowArrayIArrowArray-

FromEpoch ​

Create a new Series from epoch time.

fsharp
member FromEpoch(?timeUnit: EpochTimeUnit) : Series

Parameters

NameTypeDescription
timeUnitEpochTimeUnit (optional)-

Gather ​

Gather values by an index expression.

fsharp
member Gather(indices: Expr) : Series

Parameters

NameTypeDescription
indicesExpr-

GatherEvery ​

Take every nth value starting from an offset.

fsharp
member GatherEvery(n: uint64, ?offset: uint64) : Series

Parameters

NameTypeDescription
nuint64-
offsetuint64 (optional)-

Get ​

Get a single value by index. Returns a scalar.

fsharp
member Get(index: Expr, ?nullOnOutOfBounds: bool) : Series
member Get(index: uint64, ?nullOnOutOfBounds: bool) : Series

Parameters

NameTypeDescription
indexExpr / uint64The index expression.
nullOnOutOfBoundsbool (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).

fsharp
member GetList(index: int64) : 'Elem list

Parameters

NameTypeDescription
indexint64-

GetSlice ​

F# Slice Indexer for syntax like s[1..5] or s[..^1].

fsharp
member GetSlice(start: int64 option, finish: int64 option) : Series

Parameters

NameTypeDescription
startint64 optionThe optional inclusive start index.
finishint64 optionThe 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.

fsharp
member GetValue(index: int64, uncheck: bool) : 'T
member GetValue(index: int64) : 'T

Parameters

NameTypeDescription
indexint64The 64-bit row index.
uncheckboolIf 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.

fsharp
member GetValueOption(index: int64) : 'T option

Parameters

NameTypeDescription
indexint64-

Gt ​

Check if values in the first Series are greater than the second Series.

fsharp
member Gt(other: Series) : Series

Parameters

NameTypeDescription
otherSeries-

GtEq ​

Check if values in the first Series are greater than or equal to the second Series.

fsharp
member GtEq(other: Series) : Series

Parameters

NameTypeDescription
otherSeries-

HasNulls ​

Check whether the Series contains one or more null values.

fsharp
member HasNulls : unit -> bool

Hash ​

Compute the hash of the given Series.

fsharp
member Hash(
    ?seed: uint64,
    ?seed1: uint64,
    ?seed2: uint64,
    ?seed3: uint64
) : Series

Parameters

NameTypeDescription
seeduint64 (optional)-
seed1uint64 (optional)-
seed2uint64 (optional)-
seed3uint64 (optional)-

Hist ​

Create a histogram of the given series.

fsharp
member Hist(
    ?bins: Expr,
    ?binCount: int,
    ?includeCategory: bool,
    ?includeBreakPoint: bool
) : DataFrame

Parameters

NameTypeDescription
binsExpr (optional)-
binCountint (optional)-
includeCategorybool (optional)-
includeBreakPointbool (optional)-

Implode ​

Aggregate values into a list. Result is a Series with 1 row containing a List of all values.

fsharp
member Implode : unit -> Series

IndexOf ​

Find the index of the first occurrence of a specific value.

fsharp
member IndexOf(element: Expr) : int option

Parameters

NameTypeDescription
elementExprThe 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.

fsharp
member Interpolate(?method: InterpolationMethod) : Series

Parameters

NameTypeDescription
methodInterpolationMethod (optional)Interpolation method (Linear or Nearest).

InterpolateBy ​

Interpolates intermediate values guided by an independent variable series.

fsharp
member InterpolateBy(by: Series) : Series
member InterpolateBy(by: Expr) : Series

Parameters

NameTypeDescription
bySeries / Expr-

IsBetween ​

Check if values are between lower and upper bounds.

fsharp
member IsBetween(lower: Expr, upper: Expr, ?closedInterval: ClosedInterval) : Series

Parameters

NameTypeDescription
lowerExpr-
upperExpr-
closedIntervalClosedInterval (optional)-

IsClose ​

fsharp
member IsClose(
    other: Expr,
    ?absTol: float,
    ?relTol: float,
    ?nansEqual: bool
) : Series

Parameters

NameTypeDescription
otherExpr-
absTolfloat (optional)-
relTolfloat (optional)-
nansEqualbool (optional)-

IsDuplicated ​

Get a boolean mask indicating which values are duplicated.

fsharp
member IsDuplicated : unit -> Series

IsEmpty ​

True if the Series is empty.

fsharp
member IsEmpty(?ignoreNulls: bool) : bool

Parameters

NameTypeDescription
ignoreNullsbool (optional)-

IsFinite ​

Check if floating point values are finite (not NaN and not Inf).

fsharp
member IsFinite : unit -> Series

IsFirstDistinct ​

Return a boolean mask indicating the first occurrence of each distinct value.

fsharp
member IsFirstDistinct : unit -> Series

IsIn ​

Check if elements of this Series are in the other Series.

Check if elements of this Series are in the collections.

fsharp
member IsIn(other: Series, ?nullsEqual: bool) : Series
member IsIn(collection: seq<'T>, ?nullsEqual: bool) : Series

Parameters

NameTypeDescription
otherSeries-
nullsEqualbool (optional)-
collectionseq<'T>-

IsInfinite ​

Check if floating point values are infinite.

fsharp
member IsInfinite : unit -> Series

IsLastDistinct ​

Return a boolean mask indicating the last occurrence of each distinct value.

fsharp
member IsLastDistinct : unit -> Series

IsNan ​

Check if floating point values are NaN.

fsharp
member IsNan : unit -> Series

IsNotNan ​

Check if floating point values are not NaN.

fsharp
member IsNotNan : unit -> Series

IsNotNull ​

Returns a boolean Series indicating which values are not null.

fsharp
member IsNotNull : unit -> Series

IsNull ​

Returns a boolean Series indicating which values are null.

fsharp
member IsNull : unit -> Series

IsNullAt ​

Check whether indexed value is null。

Check whether indexed value is null.

fsharp
member IsNullAt(index: int64, ?uncheck: bool) : bool
member IsNullAt(index: int, ?uncheck: bool) : bool

Parameters

NameTypeDescription
indexint64-
uncheckbool (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).

fsharp
member IsSorted(?descending: bool, ?nullsLast: bool) : bool

Parameters

NameTypeDescription
descendingbool (optional)-
nullsLastbool (optional)-

IsUnique ​

Get a boolean mask indicating which values are unique.

fsharp
member IsUnique : unit -> Series

Item ​

[Indexer] Access value at specific index. Syntax: series.[index]

fsharp
member Item(index: int) : 'T

Parameters

NameTypeDescription
indexint-

Iter ​

Applies a dense action to non-null scalar elements in the Series. Null rows are automatically skipped.

fsharp
member Iter(action: ('T -> unit)) : unit

Parameters

NameTypeDescription
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.

fsharp
member Iter2(other: Series, action: ('T1 -> ('T2 -> unit))) : unit

Parameters

NameTypeDescription
otherSeries-
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.

fsharp
member Iter2Opt(other: Series, action: ('T1 voption -> ('T2 voption -> unit))) : unit

Parameters

NameTypeDescription
otherSeries-
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.

fsharp
member IterOpt(action: ('T voption -> unit)) : unit

Parameters

NameTypeDescription
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.

fsharp
member Iteri(action: (int64 -> ('T -> unit))) : unit

Parameters

NameTypeDescription
action(int64 -> ('T -> unit))-

IteriOpt ​

Applies an action to every row with its 64-bit index, passing a ValueOption for each row.

fsharp
member IteriOpt(action: (int64 -> ('T voption -> unit))) : unit

Parameters

NameTypeDescription
action(int64 -> ('T voption -> unit))-

Kurtosis ​

Get the Kurtosis.

fsharp
member Kurtosis(?fisher: bool, ?bias: bool) : float option

Parameters

NameTypeDescription
fisherbool (optional)If True, Fisher’s definition is used (normal ==> 0.0). If False, Pearson’s definition is used (normal ==> 3.0).
biasbool (optional)If False, the calculations are corrected for statistical bias.

Last ​

Compute the last non-null scalar value of this series.

fsharp
member Last : unit -> Series
member Last : unit -> 'T option

Len ​

Get the number of values in the Series.

fsharp
member Len : unit -> int64

Ln ​

Natural logarithm (ln).

fsharp
member Ln : unit -> Series

Log ​

Logarithm with scalar base.

fsharp
member Log(baseVal: float) : Series

Parameters

NameTypeDescription
baseValfloat-

Log10 ​

Logarithm base 10.

fsharp
member Log10 : unit -> Series

Log1p ​

Natural logarithm of 1 + x.

fsharp
member Log1p : unit -> Series

LowerBound ​

Return the lower bound of this Series’ dtype as a unit Series.

fsharp
member LowerBound : unit -> Series

Lt ​

Check if values in the first Series are less than the second Series.

fsharp
member Lt(other: Series) : Series

Parameters

NameTypeDescription
otherSeries-

LtEq ​

Check if values in the first Series are less than or equal to the second Series.

fsharp
member LtEq(other: Series) : Series

Parameters

NameTypeDescription
otherSeries-

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.

fsharp
member Map(func: (IArrowArray -> IArrowArray)) : Series
member Map(f: ('T -> 'U)) : Series

Parameters

NameTypeDescription
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.

fsharp
member MapArrow(func: (IArrowArray -> IArrowArray), ?returnType: DataType) : Series

Parameters

NameTypeDescription
func(IArrowArray -> IArrowArray)The compiled UDF (created via Udf.map or Udf.mapOption).
returnTypeDataType (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.

fsharp
member MapOption(f: ('T option -> 'U option)) : Series

Parameters

NameTypeDescription
f('T option -> 'U option)-

MapValueOption ​

Map values using an F# function that handles Value Options. Automatically wraps it using Udf.mapValueOption.

fsharp
member MapValueOption(f: ('T voption -> 'U voption)) : Series

Parameters

NameTypeDescription
f('T voption -> 'U voption)-

Max ​

Compute the maximum scalar value of this series.

fsharp
member Max : unit -> Series
member Max : unit -> 'T option

MaxBy ​

Compute the maximum value of the elements in this series, grouped by another series.

fsharp
member MaxBy(by: Expr) : Series
member MaxBy(by: Expr) : 'T option

Parameters

NameTypeDescription
byExpr-

Mean ​

Compute the mean of the elements in this series.

fsharp
member Mean : unit -> Series
member Mean : unit -> 'T option

Median ​

Get the median.

fsharp
member Median : unit -> 'T option

Returns: A new Series containing the Median (length 1).


Min ​

Compute the minimum scalar value of this series.

fsharp
member Min : unit -> Series
member Min : unit -> 'T option

MinBy ​

Compute the minimum value of the elements in this series, grouped by another series.

fsharp
member MinBy(by: Expr) : Series
member MinBy(by: Expr) : 'T option

Parameters

NameTypeDescription
byExpr-

Mod ​

Modulo (remainder).

Modulo (scalar).

fsharp
member Mod(other: Series) : Series
member Mod(other: int) : Series
member Mod(other: int64) : Series

Parameters

NameTypeDescription
otherSeries / int / int64-

Mode ​

Get the mode.

fsharp
member Mode(?maintainOrder: bool) : Series

Parameters

NameTypeDescription
maintainOrderbool (optional)-

Returns: A new Series containing the Mode (length 1).


Mul ​

Multiply two Series.

fsharp
member Mul(other: Series) : Series

Parameters

NameTypeDescription
otherSeries-

NUnique ​

Count the number of unique values.

fsharp
member NUnique : unit -> int64

NanMax ​

Compute the maximum scalar value of this series, ignoring NaN values.

fsharp
member NanMax : unit -> Series
member NanMax : unit -> 'T option

NanMin ​

Compute the minimum scalar value of this series, ignoring NaN values.

fsharp
member NanMin : unit -> Series
member NanMin : unit -> 'T option

Neq ​

Compare two Series for inequality.

fsharp
member Neq(other: Series) : Series

Parameters

NameTypeDescription
otherSeries-

NeqMissing ​

Compare two Series for inequality, ignoring nulls.

fsharp
member NeqMissing(other: Series) : Series

Parameters

NameTypeDescription
otherSeries-

NewFromIndex ​

Create a new Series filled with values from the given index.

fsharp
member NewFromIndex(index: int64, length: int64) : Series

Parameters

NameTypeDescription
indexint64-
lengthint64-

Not ​

Negate the boolean values in a Boolean Series. True becomes False, False becomes True.

fsharp
member Not : unit -> Series

PctChange ​

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.

fsharp
member PctChange(?n: int) : Series

Parameters

NameTypeDescription
nint (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.

fsharp
member PeakMax : unit -> Series

PeakMin ​

Peak minimum value of the series.

fsharp
member PeakMin : unit -> Series

Pow ​

Power with double exponent.

Power with single exponent.

Power with int64 exponent.

Power with integer exponent.

Power with Series exponent.

fsharp
member Pow(exponent: float) : Series
member Pow(exponent: float32) : Series
member Pow(exponent: int64) : Series
member Pow(exponent: int) : Series
member Pow(exponent: Series) : Series

Parameters

NameTypeDescription
exponentfloat / float32 / int64 / Series-

Product ​

Compute the product of the elements in this series.

fsharp
member Product : unit -> Series
member Product : unit -> 'T option

QCut ​

Quantile cut the series into bins based on the given quantiles.

fsharp
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
) : Series

Parameters

NameTypeDescription
quantilesseq<float> / int-
labelsseq<string> (optional)-
leftClosedbool (optional)-
allowDuplicatesbool (optional)-
includeBreaksbool (optional)-

Quantile ​

Get the quantile.

fsharp
member Quantile(q: float, ?interpolation: QuantileMethod) : Series

Parameters

NameTypeDescription
qfloatQuantile between 0.0 and 1.0.
interpolationQuantileMethod (optional)Interpolation method ("nearest", "higher", "lower", "midpoint", "linear"). Default "linear".

Rank ​

Assign ranks to data, dealing with ties appropriately.

fsharp
member Rank(?method: RankMethod, ?descending: bool, ?seed: uint64) : Series

Parameters

NameTypeDescription
methodRankMethod (optional)The method used to assign ranks to tied elements. See RankMethod for details. Default is RankMethod.Average.
descendingbool (optional)Rank in descending order.
seeduint64 (optional)If method="random", use this as seed.

Rechunk ​

fsharp
member Rechunk : unit -> Series

Returns: 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.

fsharp
member Reinterpret(?signed: bool) : Series
member Reinterpret(dtype: DataType) : Series

Parameters

NameTypeDescription
signedbool (optional)-
dtypeDataType-

Rem ​

fsharp
member Rem(other: Series) : Series
member Rem(other: int) : Series

Parameters

NameTypeDescription
otherSeries / int-

Rename ​

Rename the Series in-place. Returns self.

fsharp
member Rename(name: string) : Series

Parameters

NameTypeDescription
namestring-

RepeatBy ​

Repeat this Series by the given expression.

fsharp
member RepeatBy(by: Expr) : Series

Parameters

NameTypeDescription
byExprExpression 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.

fsharp
member Replace(old: Expr, newExpr: Expr) : Series
member Replace(oldVal: 'Old, newVal: 'New) : Series

Parameters

NameTypeDescription
oldExpr-
newExprExpr-
oldVal'Old-
newVal'New-

Replace$W ​

fsharp
member Replace$W(
    op_Dollar1: (LitMechanism -> ('New -> Expr)),
    this: Series,
    oldVal: 'Old,
    newVal: 'New
) : Series

Parameters

NameTypeDescription
op_Dollar1(LitMechanism -> ('New -> Expr))-
thisSeries-
oldVal'Old-
newVal'New-

ReplaceStrict ​

fsharp
member ReplaceStrict(
    old: Expr,
    newExpr: Expr,
    ?defaultExpr: Expr,
    ?returnDataType: DataTypeExpr
) : Series

Parameters

NameTypeDescription
oldExpr-
newExprExpr-
defaultExprExpr (optional)-
returnDataTypeDataTypeExpr (optional)-

Reshape ​

Reshape this Series to a flat Series or an Array Series.

fsharp
member Reshape(dimensions: seq<int64>) : Series

Parameters

NameTypeDescription
dimensionsseq<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.

fsharp
member Reverse : unit -> Series

Rle ​

Run length encoding of the series.

fsharp
member Rle : unit -> Series

RleId ​

Run length encoding of the series.

fsharp
member RleId : unit -> Series

RollingKurtosis ​

Apply a rolling kurtosis over a window.

fsharp
member RollingKurtosis(
    windowSize: Dur,
    ?minPeriod: int,
    ?weights: float[],
    ?center: bool,
    ?fisher: bool,
    ?bias: bool
) : Series

Parameters

NameTypeDescription
windowSizeDurThe size of the window formatted as a string duration.
Examples: "3i" (3 index rows), "1d" (1 day), "1h" (1 hour).
minPeriodint (optional)The minimum number of observations in the window required to have a value (otherwise null).
weightsfloat[] (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).
centerbool (optional)If true, the window is centered on the current observation.
Default is false (right-aligned window, [i-window, i]).
fisherbool (optional)If True, Fisher’s definition is used (normal ==> 0.0). If False, Pearson’s definition is used (normal ==> 3.0).
biasbool (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.

fsharp
member RollingMax(
    windowSize: Dur,
    ?minPeriod: int,
    ?weights: float[],
    ?center: bool
) : Series

Parameters

NameTypeDescription
windowSizeDurThe size of the window formatted as a string duration.
Examples: "3i" (3 index rows), "1d" (1 day), "1h" (1 hour).
minPeriodint (optional)The minimum number of observations in the window required to have a value (otherwise null).
weightsfloat[] (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).
centerbool (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).

fsharp
member RollingMaxBy(
    windowSize: Dur,
    by: Expr,
    ?closed: ClosedInterval,
    ?minPeriod: int
) : Series

Parameters

NameTypeDescription
windowSizeDurThe size of the dynamic window.
Supported duration strings: "1d", "2h", "10s", "500ms", etc.
byExprThe column used to define the window (the "time" axis).
Typically a Date or DateTime column, but can also be monotonic integers.
closedClosedInterval (optional)Defines how the window interval is closed. Default is ClosedWindow.Left``[t - window, t).
minPeriodint (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.

fsharp
member RollingMean(
    windowSize: Dur,
    ?minPeriod: int,
    ?weights: float[],
    ?center: bool
) : Series

Parameters

NameTypeDescription
windowSizeDurThe size of the window formatted as a string duration.
Examples: "3i" (3 index rows), "1d" (1 day), "1h" (1 hour).
minPeriodint (optional)The minimum number of observations in the window required to have a value (otherwise null).
weightsfloat[] (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).
centerbool (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).

fsharp
member RollingMeanBy(
    windowSize: Dur,
    by: Expr,
    ?closed: ClosedInterval,
    ?minPeriod: int
) : Series

Parameters

NameTypeDescription
windowSizeDurThe size of the dynamic window.
Supported duration strings: "1d", "2h", "10s", "500ms", etc.
byExprThe column used to define the window (the "time" axis).
Typically a Date or DateTime column, but can also be monotonic integers.
closedClosedInterval (optional)Defines how the window interval is closed. Default is ClosedWindow.Left``[t - window, t).
minPeriodint (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.

fsharp
member RollingMedian(
    windowSize: Dur,
    ?minPeriod: int,
    ?weights: float[],
    ?center: bool
) : Series

Parameters

NameTypeDescription
windowSizeDurThe size of the window formatted as a string duration.
Examples: "3i" (3 index rows), "1d" (1 day), "1h" (1 hour).
minPeriodint (optional)The minimum number of observations in the window required to have a value (otherwise null).
weightsfloat[] (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).
centerbool (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).

fsharp
member RollingMedianBy(
    windowSize: Dur,
    by: Expr,
    ?closed: ClosedInterval,
    ?minPeriod: int
) : Series

Parameters

NameTypeDescription
windowSizeDurThe size of the dynamic window.
Supported duration strings: "1d", "2h", "10s", "500ms", etc.
byExprThe column used to define the window (the "time" axis).
Typically a Date or DateTime column, but can also be monotonic integers.
closedClosedInterval (optional)Defines how the window interval is closed. Default is ClosedWindow.Left``[t - window, t).
minPeriodint (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.

fsharp
member RollingMin(
    windowSize: Dur,
    ?minPeriod: int,
    ?weights: float[],
    ?center: bool
) : Series

Parameters

NameTypeDescription
windowSizeDurThe size of the window formatted as a string duration.
Examples: "3i" (3 index rows), "1d" (1 day), "1h" (1 hour).
minPeriodint (optional)The minimum number of observations in the window required to have a value (otherwise null).
weightsfloat[] (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).
centerbool (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).

fsharp
member RollingMinBy(
    windowSize: Dur,
    by: Expr,
    ?closed: ClosedInterval,
    ?minPeriod: int
) : Series

Parameters

NameTypeDescription
windowSizeDurThe size of the dynamic window.
Supported duration strings: "1d", "2h", "10s", "500ms", etc.
byExprThe column used to define the window (the "time" axis).
Typically a Date or DateTime column, but can also be monotonic integers.
closedClosedInterval (optional)Defines how the window interval is closed. Default is ClosedWindow.Left``[t - window, t).
minPeriodint (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.

fsharp
member RollingQuantile(
    quantile: float,
    method: QuantileMethod,
    windowSize: Dur,
    ?minPeriod: int,
    ?weights: float[],
    ?center: bool
) : Series

Parameters

NameTypeDescription
quantilefloatQuantile between 0.0 and 1.0 (e.g., 0.5 for median).
methodQuantileMethodInterpolation method when the quantile lies between two data points.
windowSizeDurThe size of the window.
Format: "3i" (3 rows) or just a number string "3".

For time-based windows (e.g. "2h"), use RollingQuantileBy instead.
minPeriodint (optional)The minimum number of observations in the window required to have a value (otherwise null).
weightsfloat[] (optional)Optional weights for the window. The length must match the parsed window size.
If null, equal weights are used.
centerbool (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).

fsharp
member RollingQuantileBy(
    quantile: float,
    method: QuantileMethod,
    windowSize: Dur,
    by: Expr,
    ?closed: ClosedInterval,
    ?minPeriod: int
) : Series

Parameters

NameTypeDescription
quantilefloatQuantile between 0.0 and 1.0 (e.g., 0.5 for median).
methodQuantileMethodInterpolation method when the quantile lies between two data points.
windowSizeDurThe size of the time window as a TimeSpan.
This will be automatically converted to a Polars duration string (e.g., 01:30:00 -> "1h30m").
byExprThe column used to define the window (the "time" axis).
Typically a Date or DateTime column, but can also be monotonic integers.
closedClosedInterval (optional)Defines how the window interval is closed. Default is ClosedWindow.Left``[t - window, t).
minPeriodint (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.

fsharp
member RollingRank(
    windowSize: Dur,
    ?minPeriod: int,
    ?method: RankMethod,
    ?seed: uint64,
    ?weights: float[],
    ?center: bool
) : Series

Parameters

NameTypeDescription
windowSizeDurThe size of the time window as a TimeSpan.
This will be automatically converted to a Polars duration string (e.g., 01:30:00 -> "1h30m").
minPeriodint (optional)The minimum number of observations in the window required to have a value (otherwise null).
methodRankMethod (optional)The method used to assign ranks to tied elements. See RankMethod for details. Default is RankMethod.Average.
seeduint64 (optional)If method="random", use this as seed.
weightsfloat[] (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).
centerbool (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).

fsharp
member RollingRankBy(
    windowSize: Dur,
    by: Expr,
    ?method: RollingRankMethod,
    ?seed: uint64,
    ?closed: ClosedInterval,
    ?minPeriod: int
) : Series

Parameters

NameTypeDescription
windowSizeDurThe size of the dynamic window.
Supported duration strings: "1d", "2h", "10s", "500ms", etc.
byExprThe column used to define the window (the "time" axis).
Typically a Date or DateTime column, but can also be monotonic integers.
methodRollingRankMethod (optional)The method used to assign ranks to tied elements.
seeduint64 (optional)Seed for the random method (only relevant when method is Random).
closedClosedInterval (optional)Defines how the window interval is closed. Default is ClosedWindow.Left``[t - window, t).
minPeriodint (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.

fsharp
member RollingSkew(
    windowSize: Dur,
    ?minPeriod: int,
    ?weights: float[],
    ?center: bool,
    ?bias: bool
) : Series

Parameters

NameTypeDescription
windowSizeDurThe size of the window formatted as a string duration.
Examples: "3i" (3 index rows), "1d" (1 day), "1h" (1 hour).
minPeriodint (optional)The minimum number of observations in the window required to have a value (otherwise null).
weightsfloat[] (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).
centerbool (optional)If true, the window is centered on the current observation.
Default is false (right-aligned window, [i-window, i]).
biasbool (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.

fsharp
member RollingStd(
    windowSize: Dur,
    ?minPeriod: int,
    ?weights: float[],
    ?center: bool
) : Series

Parameters

NameTypeDescription
windowSizeDurThe size of the window formatted as a string duration.
Examples: "3i" (3 index rows), "1d" (1 day), "1h" (1 hour).
minPeriodint (optional)The minimum number of observations in the window required to have a value (otherwise null).
weightsfloat[] (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).
centerbool (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).

fsharp
member RollingStdBy(
    windowSize: Dur,
    by: Expr,
    ?closed: ClosedInterval,
    ?minPeriod: int
) : Series

Parameters

NameTypeDescription
windowSizeDurThe size of the dynamic window.
Supported duration strings: "1d", "2h", "10s", "500ms", etc.
byExprThe column used to define the window (the "time" axis).
Typically a Date or DateTime column, but can also be monotonic integers.
closedClosedInterval (optional)Defines how the window interval is closed. Default is ClosedWindow.Left``[t - window, t).
minPeriodint (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.

fsharp
member RollingSum(
    windowSize: Dur,
    ?minPeriod: int,
    ?weights: float[],
    ?center: bool
) : Series

Parameters

NameTypeDescription
windowSizeDurThe size of the window formatted as a string duration.
Examples: "3i" (3 index rows), "1d" (1 day), "1h" (1 hour).
minPeriodint (optional)The minimum number of observations in the window required to have a value (otherwise null).
weightsfloat[] (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).
centerbool (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).

fsharp
member RollingSumBy(
    windowSize: Dur,
    by: Expr,
    ?closed: ClosedInterval,
    ?minPeriod: int
) : Series

Parameters

NameTypeDescription
windowSizeDurThe size of the dynamic window.
Supported duration strings: "1d", "2h", "10s", "500ms", etc.
byExprThe column used to define the window (the "time" axis).
Typically a Date or DateTime column, but can also be monotonic integers.
closedClosedInterval (optional)Defines how the window interval is closed. Default is ClosedWindow.Left``[t - window, t).
minPeriodint (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.

fsharp
member RollingVar(
    windowSize: Dur,
    ?minPeriod: int,
    ?weights: float[],
    ?center: bool,
    ?ddof: byte
) : Series

Parameters

NameTypeDescription
windowSizeDurThe size of the window formatted as a string duration.
Examples: "3i" (3 index rows), "1d" (1 day), "1h" (1 hour).
minPeriodint (optional)The minimum number of observations in the window required to have a value (otherwise null).
weightsfloat[] (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).
centerbool (optional)If true, the window is centered on the current observation.
Default is false (right-aligned window, [i-window, i]).
ddofbyte (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).

fsharp
member RollingVarBy(
    windowSize: Dur,
    by: Expr,
    ?closed: ClosedInterval,
    ?minPeriod: int,
    ?ddof: byte
) : Series

Parameters

NameTypeDescription
windowSizeDurThe size of the dynamic window.
Supported duration strings: "1d", "2h", "10s", "500ms", etc.
byExprThe column used to define the window (the "time" axis).
Typically a Date or DateTime column, but can also be monotonic integers.
closedClosedInterval (optional)Defines how the window interval is closed. Default is ClosedWindow.Left``[t - window, t).
minPeriodint (optional)The minimum number of observations in the window required to have a non-null result.
ddofbyte (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.

fsharp
member Round(decimals: uint32, ?mode: RoundMode) : Series

Parameters

NameTypeDescription
decimalsuint32-
modeRoundMode (optional)-

RoundSigFigs ​

Round to given significant figures.

fsharp
member RoundSigFigs(digits: int) : Series

Parameters

NameTypeDescription
digitsint-

SampleFrac ​

Sample a fraction of the Series elements.

fsharp
member SampleFrac(
    fraction: Expr,
    ?withReplacement: bool,
    ?shuffle: bool,
    ?seed: uint64
) : Series

Parameters

NameTypeDescription
fractionExpr-
withReplacementbool (optional)-
shufflebool (optional)-
seeduint64 (optional)-

SampleN ​

Sample ‘n’ elements from this Series.

fsharp
member SampleN(
    ?n: Expr,
    ?withReplacement: bool,
    ?shuffle: bool,
    ?seed: uint64
) : Series

Parameters

NameTypeDescription
nExpr (optional)-
withReplacementbool (optional)-
shufflebool (optional)-
seeduint64 (optional)-

SearchSorted ​

Find indices where elements should be inserted to maintain order (Binary Search).

fsharp
member SearchSorted(element: Expr, ?side: SearchSortedSide, ?descending: bool) : int option

Parameters

NameTypeDescription
elementExprThe element expression to insert/search.
sideSearchSortedSide (optional)The insertion side (Any, Left, Right). Default is Any.
descendingbool (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.

fsharp
member SetSorted(?descending: bool) : Series

Parameters

NameTypeDescription
descendingbool (optional)If the Series order is descending.

Shift ​

Shift the values by a given period.

Shift by 1.

fsharp
member Shift(n: int64) : Series
member Shift(n: int) : Series
member Shift : unit -> Series

Parameters

NameTypeDescription
nint64-

Show ​

Print the Series to Console.

fsharp
member Show : unit -> unit

ShrinkToFit ​

Shrink Series memory usage.

fsharp
member ShrinkToFit : unit -> Series

Returns: A new Series


ShrinkToFitInplace ​

Shrink Series memory usage.This won't return a new Series

fsharp
member ShrinkToFitInplace : unit -> unit

Sign ​

Element-wise sign.

fsharp
member Sign : unit -> Series

Sin ​

Compute the element-wise sine.

fsharp
member Sin : unit -> Series

Sinh ​

Compute the element-wise hyperbolic sine.

fsharp
member Sinh : unit -> Series

Skew ​

Get the Skew.

fsharp
member Skew(?bias: bool) : float option

Parameters

NameTypeDescription
biasbool (optional)If False, the calculations are corrected for statistical bias.

Slice ​

Slice the Series. Returns a new Series.

fsharp
member Slice(offset: int64, ?length: uint64) : Series

Parameters

NameTypeDescription
offsetint64Start index.
lengthuint64 (optional)Length of the slice.

Sort ​

Sort this Series. Returns a new Series.

fsharp
member Sort(
    ?descending: bool,
    ?nullsLast: bool,
    ?maintainOrder: bool,
    ?multithreaded: bool
) : Series

Parameters

NameTypeDescription
descendingbool (optional)Sort in descending order (default: false).
nullsLastbool (optional)Place null values last (default: false).
maintainOrderbool (optional)Maintain the order of equal elements (Stable sort) (default: false).
multithreadedbool (optional)Use multiple threads (default: true).

Sqrt ​

Square root.

fsharp
member Sqrt : unit -> Series

Std ​

Get the standard deviation.

fsharp
member Std(?ddof: byte) : 'T option

Parameters

NameTypeDescription
ddofbyte (optional)Delta Degrees of Freedom. Default is 1.

Returns: A new Series containing the Std (length 1).


Sub ​

Subtract two Series.

fsharp
member Sub(other: Series) : Series

Parameters

NameTypeDescription
otherSeries-

Sum ​

Compute the sum of the elements in this series.

fsharp
member Sum : unit -> Series
member Sum : unit -> 'T option

Take ​

LINQ-like alias for Gather.

Take elements by physical integer indices. Note: Negative indices are not supported. All values must be >= 0.

fsharp
member Take(indices: Expr) : Series
member Take(indices: Series) : Series

Parameters

NameTypeDescription
indicesExpr / Series-

Tan ​

Compute the element-wise tangent.

fsharp
member Tan : unit -> Series

Tanh ​

Compute the element-wise hyperbolic tangent.

fsharp
member Tanh : unit -> Series

ToArray ​

Converts the Series to a managed array.

fsharp
member ToArray : unit -> 'T[]

ToArrayOption ​

Converts the Series to a managed array with optional null values.

fsharp
member ToArrayOption : unit -> 'T option[]

ToArrow ​

Converts the Series to an Arrow array.

fsharp
member ToArrow : unit -> IArrowArray

ToDataFrame ​

Converts this Series into a single-column DataFrame.

fsharp
member ToDataFrame : unit -> DataFrame

ToDummies ​

Get dummy/indicator variables.

fsharp
member ToDummies(?separator: string, ?dropFirst: bool, ?dropNulls: bool) : DataFrame

Parameters

NameTypeDescription
separatorstring (optional)Separator/delimiter used when generating column names.
dropFirstbool (optional)Remove the first category from the variable being encoded.
dropNullsbool (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.

fsharp
member ToFrame : unit -> DataFrame

ToHtml ​

Generates a rich HTML table representation of the Series by delegating to a single-column DataFrame preview.

fsharp
member ToHtml : unit -> string

Returns: An HTML string representing the Series preview.


ToListOption ​

Get values as a list (forces evaluation).

fsharp
member ToListOption : unit -> 'T option list

ToPhysical ​

Cast to physical representation of the logical dtype.

fsharp
member ToPhysical : unit -> Series

ToSeqOption ​

Convert Series to a typed sequence of Options. Uses high-performance Arrow reader (Zero-Copy). Supports: Primitives, String, DateTime, DateOnly, TimeOnly, List, Struct.

fsharp
member ToSeqOption : unit -> seq<'T option>

TopK ​

Get the k largest elements. Result is sorted descending.

fsharp
member TopK(k: int) : Series

Parameters

NameTypeDescription
kint-

TopKBy ​

Get top k elements of this Series, sorted by another Series.

Get top k elements of this Series, sorted by another Expr.

fsharp
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>) : Series

Parameters

NameTypeDescription
kint-
bySeries / Expr / seq<'b>-
reversebool (optional) / seq<bool> (optional)-

Truediv ​

True division (float result).

True division (scalar).

fsharp
member Truediv(other: Series) : Series
member Truediv(other: float) : Series

Parameters

NameTypeDescription
otherSeries / float-

Truncate ​

Truncate the given Series to the given number of decimals.

fsharp
member Truncate(?decimals: uint32) : Series

Parameters

NameTypeDescription
decimalsuint32 (optional)-

TryGetValue ​

Gets the value at the specified index as a ValueOption ('T voption).

fsharp
member TryGetValue(index: int64) : 'T voption

Parameters

NameTypeDescription
indexint64The 64-bit row index location.

Returns: ValueSome value if valid, or ValueNone if null.


Unique ​

Get unique values of this series.

fsharp
member Unique(?maintainOrder: bool) : Series

Parameters

NameTypeDescription
maintainOrderbool (optional)Maintain order of data. This requires more work.

UniqueCounts ​

Return a count of the unique values in the order of appearance.

fsharp
member UniqueCounts : unit -> SeriesHandle

Unnest ​

Unnest a Struct column into a DataFrame. Shortcut for SeriesStructOps.Unnest.

fsharp
member Unnest : unit -> DataFrame

UpperBound ​

Return the upper bound of this Series’ dtype as a unit Series.

fsharp
member UpperBound : unit -> Series

ValueCounts ​

Count the occurrences of unique values. Similar to SQL GROUP BY val COUNT(*).

fsharp
member ValueCounts(
    ?sort: bool,
    ?paralleling: bool,
    ?name: string,
    ?normalize: bool
) : DataFrame

Parameters

NameTypeDescription
sortbool (optional)Sort the output by count in descending order. Default is true.
parallelingbool (optional)Execute in parallel. Default is true.
namestring (optional)The name of the count column. Default is "count".
normalizebool (optional)If true, the count column will contain probabilities instead of counts. Default is false.

Var ​

Get the variance.

fsharp
member Var(?ddof: byte) : 'T option

Parameters

NameTypeDescription
ddofbyte (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.

fsharp
member ZipWith(mask: Series, other: Series) : Series

Parameters

NameTypeDescription
maskSeriesBoolean Series.
otherSeriesSeries of same type.

Returns: Series


Pipeline Module Functions (Series.*) ​

Series.append ​

Appends the Series to another Series.

fsharp
Series.append : other: Series -> self: Series -> Series

Parameters

NameTypeDescription
otherSeries-
selfSeries-

Series.backwardFill ​

Backward-fills null values up to an consecutive limit.

fsharp
Series.backwardFill : limit: int -> series: Series -> Series

Parameters

NameTypeDescription
limitint-
seriesSeries-

Series.bottomK ​

Get the bottom K values from the Series.

fsharp
Series.bottomK : k: int -> series: Series -> Series

Parameters

NameTypeDescription
kint-
seriesSeries-

Series.cast ​

Cast a series to a specific Polars DataType.

fsharp
Series.cast : dtype: DataType -> s: Series -> Series

Parameters

NameTypeDescription
dtypeDataTypeThe target Polars DataType.
sSeriesThe source Series.

Series.castWithNetType ​

Cast a series to a specific .NET type.

fsharp
Series.castWithNetType : s: Series -> Series

Parameters

NameTypeDescription
sSeriesThe 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.

fsharp
Series.choose : chooser: ('T -> 'U voption) -> series: Series -> Series

Parameters

NameTypeDescription
chooser('T -> 'U voption)-
seriesSeries-

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.

fsharp
Series.chooseSpan : chooser: ('T -> 'U voption) -> series: Series -> Series

Parameters

NameTypeDescription
chooser('T -> 'U voption)The function to apply to each element.
seriesSeriesThe input Series.

Returns: A new Series containing only the elements for which the function returns Some.


Series.clamp ​

Clamps series values between scalar bounds.

fsharp
Series.clamp : lowerBound: 'T -> upperBound: 'T -> series: Series -> Series

Parameters

NameTypeDescription
lowerBound'T-
upperBound'T-
seriesSeries-

Series.contains ​

Returns true if the Series contains the given value.

fsharp
Series.contains : value: 'T -> series: Series -> bool

Parameters

NameTypeDescription
value'T-
seriesSeries-

Series.dateRange ​

Generate a date range.

fsharp
Series.dateRange : name: string -> start: DateOnly -> endRange: DateOnly -> interval: Dur -> closed: ClosedInterval -> Series

Parameters

NameTypeDescription
namestring-
startDateOnlyLower bound of the date range.
endRangeDateOnly-
intervalDurInterval of the range periods, “1w2d” # 1 week, 2 days.Default is 1 day.
closedClosedIntervalDefine 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.

fsharp
Series.datetimeRange : name: string -> start: DateTime -> endRange: DateTime -> interval: Dur -> closed: ClosedInterval -> unit: TimeUnit -> timeZone: string option -> Series

Parameters

NameTypeDescription
namestringName of the resulting Series.
startDateTimeStart datetime of the range.
endRangeDateTimeEnd datetime of the range.
intervalDurInterval between datetime values.
closedClosedIntervalClosed window of the range.
unitTimeUnitTime unit of the resulting Datetime data type.
timeZonestring optionTime zone of the resulting Datetime data type.

Series.diff ​

Calculate the difference with a given period.

fsharp
Series.diff : offset: int -> series: Series -> Series

Parameters

NameTypeDescription
offsetint-
seriesSeries-

Series.dot ​

Compute the dot/inner product between two Series.

fsharp
Series.dot : other: Series -> s: Series -> 'T option

Parameters

NameTypeDescription
otherSeries-
sSeries-

Series.dropNans ​

Drops NaN values from the Series.

fsharp
Series.dropNans : series: Series -> Series

Parameters

NameTypeDescription
seriesSeries-

Series.dropNulls ​

Drops null values from the Series.

fsharp
Series.dropNulls : series: Series -> Series

Parameters

NameTypeDescription
seriesSeries-

Series.exists ​

Tests if any element of the Series satisfies the given predicate, short-circuiting on the first match.

fsharp
Series.exists : predicate: ('T -> bool) -> series: Series -> bool

Parameters

NameTypeDescription
predicate('T -> bool)-
seriesSeries-

Series.existsSeries ​

Tests if any element satisfies the boolean predicate using native Rust engine execution.

fsharp
Series.existsSeries : predicate: Series -> series: Series -> bool

Parameters

NameTypeDescription
predicateSeries-
seriesSeries-

Series.explode ​

Explode a list column into multiple rows. The resulting Series will be longer than the original.

fsharp
Series.explode : series: Series -> Series

Parameters

NameTypeDescription
seriesSeries-

Series.fillNan ​

Fills floating-point NaN values with a float (double) literal. Default floating-point pipeline operator.

fsharp
Series.fillNan : fillValue: float -> series: Series -> Series

Parameters

NameTypeDescription
fillValuefloat-
seriesSeries-

Series.fillNanExpr ​

Fills floating-point NaN values using an expression.

fsharp
Series.fillNanExpr : expr: Expr -> series: Series -> Series

Parameters

NameTypeDescription
exprExpr-
seriesSeries-

Series.fillNanSingle ​

Fills floating-point NaN values with a float32 (single) literal.

fsharp
Series.fillNanSingle : fillValue: float32 -> series: Series -> Series

Parameters

NameTypeDescription
fillValuefloat32-
seriesSeries-

Series.fillNanWith ​

Fills floating-point NaN values with values from another Series.

fsharp
Series.fillNanWith : fillSeries: Series -> series: Series -> Series

Parameters

NameTypeDescription
fillSeriesSeries-
seriesSeries-

Series.fillNull ​

Fills null values with a scalar literal using SRTP.

fsharp
Series.fillNull : value: 'T -> series: Series -> Series

Parameters

NameTypeDescription
value'T-
seriesSeries-

Series.fillNull$W ​

fsharp
Series.fillNull$W : op_Dollar: (LitMechanism -> ('T -> Expr)) -> value: 'T -> series: Series -> Series

Parameters

NameTypeDescription
op_Dollar(LitMechanism -> ('T -> Expr))-
value'T-
seriesSeries-

Series.fillNullExpr ​

Fills null values using a dynamic expression.

fsharp
Series.fillNullExpr : expr: Expr -> series: Series -> Series

Parameters

NameTypeDescription
exprExpr-
seriesSeries-

Series.fillNullStrategy ​

fsharp
Series.fillNullStrategy : strategy: FillNullStrategy -> limit: int option -> series: Series -> Series

Parameters

NameTypeDescription
strategyFillNullStrategy-
limitint option-
seriesSeries-

Series.fillNullWith ​

Fills null values with another Series (coalesce).

fsharp
Series.fillNullWith : fillSeries: Series -> series: Series -> Series

Parameters

NameTypeDescription
fillSeriesSeries-
seriesSeries-

Series.filter ​

Filter a series.

fsharp
Series.filter : predicate: Series -> series: Series -> Series

Parameters

NameTypeDescription
predicateSeriesBoolean expression used to filter the current expression.
seriesSeriesThe target Series.

Series.filterWith ​

Filters a Series using a strongly-typed F# predicate function ('T -> bool).

fsharp
Series.filterWith : predicate: ('T -> bool) -> series: Series -> Series

Parameters

NameTypeDescription
predicate('T -> bool)-
seriesSeries-

Series.fold ​

Applies a function to each element of the Series threading an accumulator argument through the computation.

fsharp
Series.fold : folder: ('State -> ('T -> 'State)) -> state: 'State -> series: Series -> 'State

Parameters

NameTypeDescription
folder('State -> ('T -> 'State))A function that updates the state given the current element.
state'StateThe initial state.
seriesSeriesThe 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.

fsharp
Series.foldSpan : folder: ('State -> ('T -> 'State)) -> state: 'State -> series: Series -> 'State

Parameters

NameTypeDescription
folder('State -> ('T -> 'State))A function that updates the state given the current element.
state'StateThe initial state.
seriesSeriesThe 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.

fsharp
Series.forall : predicate: ('T -> bool) -> series: Series -> bool

Parameters

NameTypeDescription
predicate('T -> bool)-
seriesSeries-

Series.forallSeries ​

Tests if all elements satisfy the boolean Series using native Rust engine execution.

fsharp
Series.forallSeries : predicate: Series -> series: Series -> bool

Parameters

NameTypeDescription
predicateSeries-
seriesSeries-

Series.forwardFill ​

Forward-fills null values up to an consecutive limit.

fsharp
Series.forwardFill : limit: int -> series: Series -> Series

Parameters

NameTypeDescription
limitint-
seriesSeries-

Series.head ​

Get the head value of the Series.

fsharp
Series.head : series: Series -> 'T

Parameters

NameTypeDescription
seriesSeries-

Series.implode ​

Aggregate values into a list. Result is a Series with 1 row containing a List of all values.

fsharp
Series.implode : series: Series -> Series

Parameters

NameTypeDescription
seriesSeries-

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.

fsharp
Series.init : name: string -> n: int -> initializer: (int -> 'T) -> Series

Parameters

NameTypeDescription
namestringThe name of the resulting Series.
nintThe 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.

fsharp
Series.initUnnamed : n: int -> initializer: (int -> 'T) -> Series

Parameters

NameTypeDescription
nint-
initializer(int -> 'T)-

Series.intRange ​

Generate a range of integers as a series.

fsharp
Series.intRange : name: string -> start: int64 -> endRange: int64 -> step: int64 -> Series

Parameters

NameTypeDescription
namestring-
startint64Start of the range (inclusive).
endRangeint64-
stepint64Step size of the range.

Series.interpolate ​

Interpolates intermediate null values linearly or using nearest neighbors.

fsharp
Series.interpolate : method: InterpolationMethod -> series: Series -> Series

Parameters

NameTypeDescription
methodInterpolationMethod-
seriesSeries-

Series.interpolateBy ​

Interpolates intermediate values guided by an independent variable series.

fsharp
Series.interpolateBy : by: Series -> series: Series -> Series

Parameters

NameTypeDescription
bySeries-
seriesSeries-

Series.iter ​

Pipeline alias for Series.Iter: ('T -> unit) -> Series -> unit.

fsharp
Series.iter : action: ('T -> unit) -> series: Series -> unit

Parameters

NameTypeDescription
action('T -> unit)-
seriesSeries-

Series.iter2 ​

Pipeline alias for Series.Iter2: ('T1 -> 'T2 -> unit) -> Series -> Series -> unit.

fsharp
Series.iter2 : action: ('T1 -> ('T2 -> unit)) -> s1: Series -> s2: Series -> unit

Parameters

NameTypeDescription
action('T1 -> ('T2 -> unit))-
s1Series-
s2Series-

Series.iter2Opt ​

Pipeline alias for Series.Iter2Opt: ('T1 voption -> 'T2 voption -> unit) -> Series -> Series -> unit.

fsharp
Series.iter2Opt : action: ('T1 voption -> ('T2 voption -> unit)) -> s1: Series -> s2: Series -> unit

Parameters

NameTypeDescription
action('T1 voption -> ('T2 voption -> unit))-
s1Series-
s2Series-

Series.iterOpt ​

Pipeline alias for Series.IterOpt: ('T voption -> unit) -> Series -> unit.

fsharp
Series.iterOpt : action: ('T voption -> unit) -> series: Series -> unit

Parameters

NameTypeDescription
action('T voption -> unit)-
seriesSeries-

Series.iteri ​

Pipeline alias for Series.Iteri: (int64 -> 'T -> unit) -> Series -> unit.

fsharp
Series.iteri : action: (int64 -> ('T -> unit)) -> series: Series -> unit

Parameters

NameTypeDescription
action(int64 -> ('T -> unit))-
seriesSeries-

Series.iteriOpt ​

Pipeline alias for Series.IteriOpt: (int64 -> 'T voption -> unit) -> Series -> unit.

fsharp
Series.iteriOpt : action: (int64 -> ('T voption -> unit)) -> series: Series -> unit

Parameters

NameTypeDescription
action(int64 -> ('T voption -> unit))-
seriesSeries-

Series.length ​

Returns the length of the Series.

fsharp
Series.length : series: Series -> int

Parameters

NameTypeDescription
seriesSeries-

Series.linearSpace ​

Converts a linear space expression to a Series with the specified name.

fsharp
Series.linearSpace : name: string -> start: Expr -> endRange: Expr -> numSamples: int -> closed: ClosedInterval -> Series

Parameters

NameTypeDescription
namestringName of the resulting Series.
startExprLower bound of the linear space.
endRangeExprUpper bound of the linear space.
numSamplesintNumber of samples to generate.
closedClosedIntervalWhether 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.

fsharp
Series.map : mapping: ('T -> 'U) -> series: Series -> Series

Parameters

NameTypeDescription
mapping('T -> 'U)The mapping function applied to each element.
seriesSeriesThe 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.

fsharp
Series.map2 : mapping: ('T -> ('U -> 'V)) -> series1: Series -> series2: Series -> Series

Parameters

NameTypeDescription
mapping('T -> ('U -> 'V))The mapping function applied to each pair of elements.
series1SeriesThe first input Series.
series2SeriesThe 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.

fsharp
Series.mapOption : mapping: ('T option -> 'U option) -> series: Series -> Series

Parameters

NameTypeDescription
mapping('T option -> 'U option)The mapping function taking and returning F# Option.
seriesSeriesThe 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.

fsharp
Series.mapValueOption : mapping: ('T voption -> 'U voption) -> series: Series -> Series

Parameters

NameTypeDescription
mapping('T voption -> 'U voption)The mapping function taking and returning F# ValueOption.
seriesSeriesThe 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.

fsharp
Series.mapi : mapping: (int -> ('T -> 'U)) -> series: Series -> Series

Parameters

NameTypeDescription
mapping(int -> ('T -> 'U))A function that transforms the 0-based index and current element into a new value.
seriesSeriesThe 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.

fsharp
Series.mapi2 : mapping: (int -> ('T -> ('U -> 'V))) -> series1: Series -> series2: Series -> Series

Parameters

NameTypeDescription
mapping(int -> ('T -> ('U -> 'V)))The mapping function applied to index and each pair of elements.
series1SeriesThe first input Series.
series2SeriesThe 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.

fsharp
Series.mapiOption : mapping: (int -> ('T option -> 'U option)) -> series: Series -> Series

Parameters

NameTypeDescription
mapping(int -> ('T option -> 'U option))A function that transforms the 0-based index and current option element.
seriesSeriesThe 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.

fsharp
Series.mapiValueOption : mapping: (int -> ('T voption -> 'U voption)) -> series: Series -> Series

Parameters

NameTypeDescription
mapping(int -> ('T voption -> 'U voption))A function that transforms the 0-based index and current value-option element.
seriesSeriesThe 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

fsharp
Series.ofArray2D : data: 'T[,] -> Series

Parameters

NameTypeDescription
data'T[,]-

Series.ofArray2DNamed ​

Create a named FixedSizeList Series from a 2D Array (Matrix).

fsharp
Series.ofArray2DNamed : name: string -> data: 'T[,] -> Series

Parameters

NameTypeDescription
namestring-
data'T[,]-

Series.ofSeq ​

Create a Series from a sequence of values.

fsharp
Series.ofSeq : data: seq<'T> -> Series

Parameters

NameTypeDescription
dataseq<'T>-

Series.ofSeqNamed ​

Create a named Series from a sequence of values.

fsharp
Series.ofSeqNamed : name: string -> data: seq<'T> -> Series

Parameters

NameTypeDescription
namestring-
dataseq<'T>-

Series.oneCreate ​

Creates a new Series of length n filled with the one value of type 'T.

fsharp
Series.oneCreate : n: int -> Series

Parameters

NameTypeDescription
nintThe 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).

fsharp
Series.pairwiseMap : mapping: ('T -> ('T -> 'U)) -> series: Series -> Series

Parameters

NameTypeDescription
mapping('T -> ('T -> 'U))-
seriesSeries-

Series.rechunk ​

Rechunk the Series to ensure it is contiguous.

fsharp
Series.rechunk : series: Series -> Series

Parameters

NameTypeDescription
seriesSeriesThe 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.

fsharp
Series.reduce : reduction: ('T -> ('T -> 'T)) -> series: Series -> 'T

Parameters

NameTypeDescription
reduction('T -> ('T -> 'T))The reduction function.
seriesSeriesThe target Series.

Returns: The reduced value.


Series.rename ​

Renames the Series.

fsharp
Series.rename : name: string -> series: Series -> Series

Parameters

NameTypeDescription
namestring-
seriesSeries-

Series.replace ​

Replace values in the series using replacement expressions.

fsharp
Series.replace : old: Expr -> newExpr: Expr -> series: Series -> Series

Parameters

NameTypeDescription
oldExprThe expression or series identifying values to replace.
newExprExprThe expression or series containing replacement values.
seriesSeriesThe target Series.

Returns: A new Series with replaced values.


Series.replaceScalar ​

Replace scalar values in the series using SRTP literals.

fsharp
Series.replaceScalar : oldVal: 'Old -> newVal: 'New -> series: Series -> Series

Parameters

NameTypeDescription
oldVal'Old-
newVal'New-
seriesSeries-

Series.replaceScalar$W ​

fsharp
Series.replaceScalar$W : op_Dollar: (LitMechanism -> ('Old -> Expr)) -> op_Dollar1: (LitMechanism -> ('New -> Expr)) -> oldVal: 'Old -> newVal: 'New -> series: Series -> Series

Parameters

NameTypeDescription
op_Dollar(LitMechanism -> ('Old -> Expr))-
op_Dollar1(LitMechanism -> ('New -> Expr))-
oldVal'Old-
newVal'New-
seriesSeries-

Series.replaceStrict ​

Strictly replace values in the series. Throws an error if unmatched unless defaultExpr is provided.

fsharp
Series.replaceStrict : old: Expr -> newExpr: Expr -> defaultExpr: Expr option -> returnDataType: DataTypeExpr option -> series: Series -> Series

Parameters

NameTypeDescription
oldExpr-
newExprExpr-
defaultExprExpr option-
returnDataTypeDataTypeExpr option-
seriesSeries-

Series.replicate ​

Creates a new Series of length n filled with a specified scalar constant.

fsharp
Series.replicate : n: int -> value: 'T -> Series

Parameters

NameTypeDescription
nintThe length of the resulting Series.
value'TThe constant scalar value.

Returns: A new Series repeating the scalar value.


Series.replicate$W ​

fsharp
Series.replicate$W : op_Dollar: (LitMechanism -> ('T -> Expr)) -> n: int -> value: 'T -> Series

Parameters

NameTypeDescription
op_Dollar(LitMechanism -> ('T -> Expr))-
nint-
value'T-

Series.replicateFromIndex ​

Creates a new Series of the specified length filled with the value at the given index.

fsharp
Series.replicateFromIndex : index: int -> length: int -> series: Series -> Series

Parameters

NameTypeDescription
indexintThe 0-based index of the value to replicate.
lengthintThe length of the newly created Series.
seriesSeriesThe source Series.

Returns: A new Series filled with the replicated value.


Series.reshape ​

Reshape this Series to a flat Series or an Array Series.

fsharp
Series.reshape : shape: seq<int64> -> s: Series -> Series

Parameters

NameTypeDescription
shapeseq<int64>-
sSeries-

Series.reverse ​

Reverse the order of the elements in the Series.

fsharp
Series.reverse : s: Series -> Series

Parameters

NameTypeDescription
sSeries-

Series.scan ​

Applies a function to each element and an accumulator, yielding a new Series of the accumulated values at each step.

fsharp
Series.scan : folder: ('State -> ('T -> 'State)) -> state: 'State -> series: Series -> Series

Parameters

NameTypeDescription
folder('State -> ('T -> 'State))The accumulation function.
state'StateThe initial state value.
seriesSeriesThe 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.

fsharp
Series.scanSpan : folder: ('State -> ('T -> 'State)) -> state: 'State -> series: Series -> Series

Parameters

NameTypeDescription
folder('State -> ('T -> 'State))-
state'StateThe initial state value.
seriesSeriesThe target Series.

Returns: A new Series containing intermediate accumulated results.


Series.shift ​

Shift the values in the Series by a given offset.

fsharp
Series.shift : offset: int -> series: Series -> Series

Parameters

NameTypeDescription
offsetint-
seriesSeries-

Series.show ​

Prints the Series to the console.

fsharp
Series.show : series: Series -> Series

Parameters

NameTypeDescription
seriesSeries-

Series.slice ​

Slices the Series.

fsharp
Series.slice : start: int -> length: int -> series: Series -> Series

Parameters

NameTypeDescription
startint-
lengthint-
seriesSeries-

Series.sortAscending ​

Sort the values in the Series in ascending order.

fsharp
Series.sortAscending : series: Series -> Series

Parameters

NameTypeDescription
seriesSeries-

Series.sortDescending ​

Sort the values in the Series in descending order.

fsharp
Series.sortDescending : series: Series -> Series

Parameters

NameTypeDescription
seriesSeries-

Series.tail ​

Get the tail value of the Series.

fsharp
Series.tail : series: Series -> 'T

Parameters

NameTypeDescription
seriesSeries-

Series.timeRange ​

Converts a time range expression to a Series with the specified name.

fsharp
Series.timeRange : name: string -> start: TimeOnly -> endRange: TimeOnly -> interval: Dur -> closed: ClosedInterval -> Series

Parameters

NameTypeDescription
namestringName of the resulting Series.
startTimeOnlyStart time of the range.
endRangeTimeOnlyEnd time of the range.
intervalDurInterval between time values.
closedClosedIntervalClosed window of the range.

Series.toArray ​

Convert a Series to an array.

fsharp
Series.toArray : series: Series -> 'T[]

Parameters

NameTypeDescription
seriesSeries-

Series.toArrayOption ​

Convert a Series to an array with optional null values.

fsharp
Series.toArrayOption : series: Series -> 'T option[]

Parameters

NameTypeDescription
seriesSeries-

Series.toArrow ​

Converts the Series to an Arrow array.

fsharp
Series.toArrow : series: Series -> IArrowArray

Parameters

NameTypeDescription
seriesSeriesThe target Series.

Series.toExpr ​

Convert the Series to Expr.

fsharp
Series.toExpr : series: Series -> Expr

Parameters

NameTypeDescription
seriesSeries-

Series.toFrame ​

Converts the Series to a DataFrame with a single column.

fsharp
Series.toFrame : series: Series -> DataFrame

Parameters

NameTypeDescription
seriesSeriesThe target Series.

Series.toSeq ​

Convert a Series to a sequence with optional null values.

fsharp
Series.toSeq : series: Series -> seq<'T>

Parameters

NameTypeDescription
seriesSeries-

Series.toSeqOption ​

Convert a Series to a sequence.

fsharp
Series.toSeqOption : series: Series -> seq<'T option>

Parameters

NameTypeDescription
seriesSeries-

Series.topK ​

Get the top K values from the Series.

fsharp
Series.topK : k: int -> series: Series -> Series

Parameters

NameTypeDescription
kint-
seriesSeries-

Series.tryFind ​

Returns the first non-null element for which the given function returns true, or None if no such element is found.

fsharp
Series.tryFind : predicate: ('T -> bool) -> series: Series -> 'T option

Parameters

NameTypeDescription
predicate('T -> bool)-
seriesSeries-

Series.tryFindIndex ​

Returns the 0-based index of the first non-null element satisfying the predicate, or None if no such element is found.

fsharp
Series.tryFindIndex : predicate: ('T -> bool) -> series: Series -> int64 option

Parameters

NameTypeDescription
predicate('T -> bool)-
seriesSeries-

Series.tryFindV ​

ValueOption variant of tryFind to avoid reference-type heap allocation.

fsharp
Series.tryFindV : predicate: ('T -> bool) -> series: Series -> 'T voption

Parameters

NameTypeDescription
predicate('T -> bool)-
seriesSeries-

Series.tryHead ​

Try to get the head value of the Series.

fsharp
Series.tryHead : series: Series -> 'T option

Parameters

NameTypeDescription
seriesSeries-

Series.tryHeadOrDefault ​

Try to get the head value of the Series with a default value.

fsharp
Series.tryHeadOrDefault : defaultValue: 'T -> series: Series -> 'T

Parameters

NameTypeDescription
defaultValue'T-
seriesSeries-

Series.tryHeadV ​

Try to get the head value of the Series as a value option.

fsharp
Series.tryHeadV : series: Series -> 'T voption

Parameters

NameTypeDescription
seriesSeries-

Series.tryTail ​

Try to get the tail value of the Series.

fsharp
Series.tryTail : series: Series -> 'T option

Parameters

NameTypeDescription
seriesSeries-

Series.tryTailOrDefault ​

Try to get the tail value of the Series with a default value.

fsharp
Series.tryTailOrDefault : defaultValue: 'T -> series: Series -> 'T

Parameters

NameTypeDescription
defaultValue'T-
seriesSeries-

Series.tryTailV ​

Try to get the tail value of the Series as a value option.

fsharp
Series.tryTailV : series: Series -> 'T voption

Parameters

NameTypeDescription
seriesSeries-

Series.unfold ​

Generates a new Series from a state-transition function, up to a maximum length. Emits None to terminate sequence generation early.

fsharp
Series.unfold : generator: ('State -> ('T * 'State) voption) -> initialState: 'State -> maxLen: int -> name: string -> Series

Parameters

NameTypeDescription
generator('State -> ('T * 'State) voption)-
initialState'State-
maxLenint-
namestring-

Series.unique ​

Returns the unique values of the Series.

fsharp
Series.unique : series: Series -> Series

Parameters

NameTypeDescription
seriesSeries-

Series.uniqueWithOrder ​

Returns the unique values of the Series with the order maintained.

fsharp
Series.uniqueWithOrder : series: Series -> Series

Parameters

NameTypeDescription
seriesSeries-

Series.unnest ​

Unnest a Struct series into a DataFrame. Shortcut for SeriesStructOps.Unnest.

fsharp
Series.unnest : series: Series -> DataFrame

Parameters

NameTypeDescription
seriesSeries-

Series.zeroCreate ​

Creates a new Series of length n filled with the zero value of type 'T.

fsharp
Series.zeroCreate : n: int -> Series

Parameters

NameTypeDescription
nintThe 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.

fsharp
Series.zip : other: Series -> self: Series -> ('T voption * 'U voption)[]

Parameters

NameTypeDescription
otherSeriesThe second Series.
selfSeriesThe 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.

fsharp
Series.zipWith : mask: Series -> other: Series -> self: Series -> Series

Parameters

NameTypeDescription
maskSeries-
otherSeries-
selfSeries-

Released under the MIT License. Powered by the Polars Rust core & Apache Arrow.