Skip to content

LazyFrame ​

Namespace: Polars.FSharp

A LazyFrame represents a logical plan of operations that will be optimized and executed only when collected.

Operations on LazyFrame are not executed immediately. Instead, they build a query plan. Use Collect() to execute the plan and get a DataFrame.

Properties & Indexers ​

PropertyTypeDescription
ColumnNamesstring list-
Columnsstring list-
DataTypesDataType list-
SchemaPolarsSchemaGet the schema of the LazyFrame without executing it. Uses Zero-Copy native introspection.

Constructors & Static Methods ​

Concat ​

Concatenate multiple LazyFrames.

fsharp
static member Concat(
    lfs: seq<LazyFrame>,
    ?how: ConcatType,
    ?rechunk: bool,
    ?useParallel: bool
) : LazyFrame

Parameters

NameTypeDescription
lfsseq<LazyFrame>-
howConcatType (optional)-
rechunkbool (optional)-
useParallelbool (optional)-

ConcatDiagonal ​

Concatenate multiple LazyFrames diagonally.

fsharp
static member ConcatDiagonal(lfs: seq<LazyFrame>) : LazyFrame

Parameters

NameTypeDescription
lfsseq<LazyFrame>-

ConcatHorizontal ​

Concatenate multiple LazyFrames horizontally.

fsharp
static member ConcatHorizontal(lfs: seq<LazyFrame>) : LazyFrame

Parameters

NameTypeDescription
lfsseq<LazyFrame>-

ConcatVertical ​

Concatenate multiple LazyFrames vertically.

fsharp
static member ConcatVertical(lfs: seq<LazyFrame>) : LazyFrame

Parameters

NameTypeDescription
lfsseq<LazyFrame>-

ScanCsv ​

Lazily scans a CSV file into a LazyFrame.

This allows for query optimization (predicate pushdown, projection pushdown) and streaming processing of datasets larger than memory.

Lazily scans a CSV from an in-memory byte array.

Lazily scans a CSV from a Stream.

This reads the stream fully into memory to construct the Lazy execution plan.

Helper: Scan CSV with default settings

fsharp
static member ScanCsv(
    path: string,
    ?schema: PolarsSchema,
    ?dtypeOverride: PolarsSchema,
    ?hasHeader: bool,
    ?separator: char,
    ?quoteChar: char,
    ?eolChar: char,
    ?ignoreErrors: bool,
    ?tryParseDates: bool,
    ?lowMemory: bool,
    ?cache: bool,
    ?glob: bool,
    ?rechunk: bool,
    ?raiseIfEmpty: bool,
    ?skipRows: uint64,
    ?skipRowsAfterHeader: uint64,
    ?skipLines: uint64,
    ?nRows: uint64,
    ?inferSchemaLength: uint64,
    ?inferSchemaFiles: uint64,
    ?nThreads: uint64,
    ?chunkSize: uint64,
    ?rowIndexName: string,
    ?rowIndexOffset: uint64,
    ?includeFilePaths: string,
    ?encoding: CsvEncoding,
    ?nullValues: seq<string>,
    ?missingIsNull: bool,
    ?commentPrefix: string,
    ?decimalComma: bool,
    ?truncateRaggedLines: bool,
    ?cloudOptions: CloudOptions
) : LazyFrame

static member ScanCsv(
    buffer: byte[],
    ?schema: PolarsSchema,
    ?dtypeOverride: PolarsSchema,
    ?hasHeader: bool,
    ?separator: char,
    ?quoteChar: char,
    ?eolChar: char,
    ?ignoreErrors: bool,
    ?tryParseDates: bool,
    ?lowMemory: bool,
    ?cache: bool,
    ?glob: bool,
    ?rechunk: bool,
    ?raiseIfEmpty: bool,
    ?skipRows: uint64,
    ?skipRowsAfterHeader: uint64,
    ?skipLines: uint64,
    ?nRows: uint64,
    ?inferSchemaLength: uint64,
    ?inferSchemaFiles: uint64,
    ?nThreads: uint64,
    ?chunkSize: uint64,
    ?rowIndexName: string,
    ?rowIndexOffset: uint64,
    ?includeFilePaths: string,
    ?encoding: CsvEncoding,
    ?nullValues: seq<string>,
    ?missingIsNull: bool,
    ?commentPrefix: string,
    ?decimalComma: bool,
    ?truncateRaggedLines: bool
) : LazyFrame

static member ScanCsv(
    stream: Stream,
    ?schema: PolarsSchema,
    ?hasHeader: bool,
    ?separator: char,
    ?quoteChar: char,
    ?eolChar: char,
    ?ignoreErrors: bool,
    ?tryParseDates: bool,
    ?lowMemory: bool,
    ?cache: bool,
    ?glob: bool,
    ?rechunk: bool,
    ?raiseIfEmpty: bool,
    ?skipRows: uint64,
    ?skipRowsAfterHeader: uint64,
    ?skipLines: uint64,
    ?nRows: uint64,
    ?inferSchemaLength: uint64,
    ?inferSchemaFiles: uint64,
    ?nThreads: uint64,
    ?chunkSize: uint64,
    ?rowIndexName: string,
    ?rowIndexOffset: uint64,
    ?includeFilePaths: string,
    ?encoding: CsvEncoding,
    ?nullValues: seq<string>,
    ?missingIsNull: bool,
    ?commentPrefix: string,
    ?decimalComma: bool,
    ?truncateRaggedLines: bool
) : LazyFrame

static member ScanCsv(path: string) : LazyFrame

Parameters

NameTypeDescription
pathstring-
schemaPolarsSchema (optional)-
dtypeOverridePolarsSchema (optional)-
hasHeaderbool (optional)-
separatorchar (optional)-
quoteCharchar (optional)-
eolCharchar (optional)-
ignoreErrorsbool (optional)-
tryParseDatesbool (optional)-
lowMemorybool (optional)-
cachebool (optional)-
globbool (optional)-
rechunkbool (optional)-
raiseIfEmptybool (optional)-
skipRowsuint64 (optional)-
skipRowsAfterHeaderuint64 (optional)-
skipLinesuint64 (optional)-
nRowsuint64 (optional)-
inferSchemaLengthuint64 (optional)-
inferSchemaFilesuint64 (optional)-
nThreadsuint64 (optional)-
chunkSizeuint64 (optional)-
rowIndexNamestring (optional)-
rowIndexOffsetuint64 (optional)-
includeFilePathsstring (optional)-
encodingCsvEncoding (optional)-
nullValuesseq<string> (optional)-
missingIsNullbool (optional)-
commentPrefixstring (optional)-
decimalCommabool (optional)-
truncateRaggedLinesbool (optional)-
cloudOptionsCloudOptions (optional)-
bufferbyte[]-
streamStream-

ScanDb ​

Scan a database query lazily. Requires a factory function to create new IDataReaders for potential multi-pass scans.

[Lazy][Streaming] Scan a database DataReader directly.

fsharp
static member ScanDb(readerFactory: (unit -> IDataReader), ?batchSize: int, ?useBuffered: bool) : LazyFrame
static member ScanDb(reader: IDataReader, ?batchSize: int) : LazyFrame

Parameters

NameTypeDescription
readerFactory(unit -> IDataReader)-
batchSizeint (optional)-
useBufferedbool (optional)-
readerIDataReader-

ScanDelta ​

Create a LazyFrame by scanning a Delta Lake table.

fsharp
static member ScanDelta(
    path: string,
    ?version: uint64,
    ?datetime: string,
    ?nRows: uint64,
    ?parallelStrategy: ParallelStrategy,
    ?lowMemory: bool,
    ?useStatistics: bool,
    ?glob: bool,
    ?rechunk: bool,
    ?cache: bool,
    ?rowIndexName: string,
    ?rowIndexOffset: uint32,
    ?includePathColumn: string,
    ?schema: PolarsSchema,
    ?hivePartitioning: bool,
    ?hivePartitionSchema: PolarsSchema,
    ?tryParseHiveDates: bool,
    ?cloudOptions: CloudOptions
) : LazyFrame

Parameters

NameTypeDescription
pathstringPath to the Delta Lake table (folder containing _delta_log).
versionuint64 (optional)The version of the table to read (e.g., 0L, 1L). Mutually exclusive with datetime.
datetimestring (optional)The timestamp to read (ISO-8601 string, e.g., "2026-02-09T12:00:00Z"). Mutually exclusive with version.
nRowsuint64 (optional)-
parallelStrategyParallelStrategy (optional)-
lowMemorybool (optional)-
useStatisticsbool (optional)-
globbool (optional)-
rechunkbool (optional)-
cachebool (optional)-
rowIndexNamestring (optional)-
rowIndexOffsetuint32 (optional)-
includePathColumnstring (optional)-
schemaPolarsSchema (optional)-
hivePartitioningbool (optional)-
hivePartitionSchemaPolarsSchema (optional)-
tryParseHiveDatesbool (optional)-
cloudOptionsCloudOptions (optional)-

Returns: A new LazyFrame.


ScanIpc ​

Lazily read an Arrow IPC (Feather v2) file, multiple files via glob patterns, or cloud storage.

Lazily read Arrow IPC (Feather v2) from in-memory bytes.

Lazily read Arrow IPC (Feather v2) from a Stream.

fsharp
static member ScanIpc(
    path: string,
    ?schema: PolarsSchema,
    ?nRows: uint64,
    ?rechunk: bool,
    ?cache: bool,
    ?glob: bool,
    ?rowIndexName: string,
    ?rowIndexOffset: uint32,
    ?includePathColumn: string,
    ?hivePartitioning: bool,
    ?hivePartitionSchema: PolarsSchema,
    ?tryParseHiveDates: bool,
    ?cloudOptions: CloudOptions
) : LazyFrame

static member ScanIpc(
    buffer: byte[],
    ?schema: PolarsSchema,
    ?nRows: uint64,
    ?rechunk: bool,
    ?cache: bool,
    ?rowIndexName: string,
    ?rowIndexOffset: uint32,
    ?includePathColumn: string,
    ?hivePartitioning: bool,
    ?hivePartitionSchema: PolarsSchema,
    ?tryParseHiveDates: bool
) : LazyFrame

static member ScanIpc(
    stream: Stream,
    ?schema: PolarsSchema,
    ?nRows: uint64,
    ?rechunk: bool,
    ?cache: bool,
    ?rowIndexName: string,
    ?rowIndexOffset: uint32,
    ?includePathColumn: string,
    ?hivePartitioning: bool,
    ?hivePartitionSchema: PolarsSchema,
    ?tryParseHiveDates: bool
) : LazyFrame

Parameters

NameTypeDescription
pathstring-
schemaPolarsSchema (optional)-
nRowsuint64 (optional)-
rechunkbool (optional)-
cachebool (optional)-
globbool (optional)-
rowIndexNamestring (optional)-
rowIndexOffsetuint32 (optional)-
includePathColumnstring (optional)-
hivePartitioningbool (optional)-
hivePartitionSchemaPolarsSchema (optional)-
tryParseHiveDatesbool (optional)-
cloudOptionsCloudOptions (optional)-
bufferbyte[]-
streamStream-

NOTE

This reads the stream fully into memory to construct the Lazy execution plan.


ScanNdjson ​

Lazily read a NDJSON file.

Lazily read NDJSON from in-memory bytes.

Lazily read NDJSON from a Stream.

fsharp
static member ScanNdjson(
    path: string,
    ?schema: PolarsSchema,
    ?inferSchemaLen: uint64,
    ?batchSize: uint64,
    ?nRows: uint64,
    ?lowMemory: bool,
    ?rechunk: bool,
    ?ignoreErrors: bool,
    ?rowIndexName: string,
    ?rowIndexOffset: uint32,
    ?includePathColumn: string,
    ?cloudOptions: CloudOptions
) : LazyFrame

static member ScanNdjson(
    buffer: byte[],
    ?schema: PolarsSchema,
    ?inferSchemaLen: uint64,
    ?batchSize: uint64,
    ?nRows: uint64,
    ?lowMemory: bool,
    ?rechunk: bool,
    ?ignoreErrors: bool,
    ?rowIndexName: string,
    ?rowIndexOffset: uint32
) : LazyFrame

static member ScanNdjson(
    stream: Stream,
    ?schema: PolarsSchema,
    ?inferSchemaLen: uint64,
    ?batchSize: uint64,
    ?nRows: uint64,
    ?lowMemory: bool,
    ?rechunk: bool,
    ?ignoreErrors: bool,
    ?rowIndexName: string,
    ?rowIndexOffset: uint32
) : LazyFrame

Parameters

NameTypeDescription
pathstring-
schemaPolarsSchema (optional)-
inferSchemaLenuint64 (optional)-
batchSizeuint64 (optional)-
nRowsuint64 (optional)-
lowMemorybool (optional)-
rechunkbool (optional)-
ignoreErrorsbool (optional)-
rowIndexNamestring (optional)-
rowIndexOffsetuint32 (optional)-
includePathColumnstring (optional)-
cloudOptionsCloudOptions (optional)-
bufferbyte[]-
streamStream-

ScanParquet ​

Scan a parquet file into a LazyFrame.

Lazily read from a parquet file or a common cloud store (S3, GCS, Azure, etc.).

[Memory] Lazily read parquet from a byte array (in-memory buffer).

fsharp
static member ScanParquet(
    path: string,
    ?nRows: uint64,
    ?parallelStrategy: ParallelStrategy,
    ?lowMemory: bool,
    ?useStatistics: bool,
    ?glob: bool,
    ?allowMissingColumns: bool,
    ?rechunk: bool,
    ?cache: bool,
    ?rowIndexName: string,
    ?rowIndexOffset: uint32,
    ?includePathColumn: string,
    ?schema: PolarsSchema,
    ?hivePartitioning: bool,
    ?hivePartitionSchema: PolarsSchema,
    ?tryParseHiveDates: bool,
    ?cloudOptions: CloudOptions
) : LazyFrame

static member ScanParquet(
    buffer: byte[],
    ?nRows: uint64,
    ?parallelStrategy: ParallelStrategy,
    ?lowMemory: bool,
    ?useStatistics: bool,
    ?glob: bool,
    ?allowMissingColumns: bool,
    ?rechunk: bool,
    ?cache: bool,
    ?rowIndexName: string,
    ?rowIndexOffset: uint32,
    ?includePathColumn: string,
    ?schema: PolarsSchema,
    ?hivePartitioning: bool,
    ?hivePartitionSchema: PolarsSchema,
    ?tryParseHiveDates: bool
) : LazyFrame

Parameters

NameTypeDescription
pathstringPath to file or cloud location.
nRowsuint64 (optional)Stop reading after n rows.
parallelStrategyParallelStrategy (optional)-
lowMemorybool (optional)Reduce memory pressure at the expense of performance.
useStatisticsbool (optional)Use parquet statistics to prune row groups.
globbool (optional)Expand path using globbing rules.
allowMissingColumnsbool (optional)If true, do not fail if columns are missing.
rechunkbool (optional)Rechunk the memory to contiguous chunks when reading. (default: false)
cachebool (optional)Cache the result after reading. (default: true)
rowIndexNamestring (optional)If provided, add a row index column with this name.
rowIndexOffsetuint32 (optional)Start index for the row index column.
includePathColumnstring (optional)If provided, add a column with the path of the file.
schemaPolarsSchema (optional)Overwrite the schema of the dataset.
hivePartitioningbool (optional)-
hivePartitionSchemaPolarsSchema (optional)The schema of the hive partitions.
tryParseHiveDatesbool (optional)Attempt to parse hive values as Date/Datetime.
cloudOptionsCloudOptions (optional)Options for cloud storage (AWS S3, Azure Blob, GCS, etc.).
bufferbyte[]The byte array containing parquet data.

ScanSeq ​

Lazily scan a sequence of objects using Apache Arrow Stream Interface. This supports predicate pushdown and streaming execution. Data is pulled from the sequence only when needed.

fsharp
static member ScanSeq(data: seq<'T>, ?batchSize: int, ?useBuffered: bool) : LazyFrame

Parameters

NameTypeDescription
dataseq<'T>The data source sequence.
batchSizeint (optional)Rows per Arrow batch (default: 100,000).
useBufferedbool (optional)Choose whether disk buffer file needed (for big data)

Instance Methods ​

AsQueryable ​

Convert LazyFrame into an IQueryable LINQ query provider. Operations will be translated to Polars Expressions and compiled into execution plans.

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

BottomK ​

Get the bottom k rows based on the given columns.

fsharp
member BottomK(k: int, by: seq<'a>, ?reverse: seq<bool>) : LazyFrame
member BottomK(k: int, by: seq<'a>, reverse: bool) : LazyFrame

Parameters

NameTypeDescription
kint-
byseq<'a>-
reverseseq<bool> (optional)-

Cast ​

Cast LazyFrame column(s) to the specified dtype(s) using a dictionary mapping.

Cast all columns in the LazyFrame to the specified dtype.

Cast columns matching an Expr/Selector to a specific DataType.

Cast multiple expressions/selectors to their target DataTypes. Example: lf.Cast([ (pl.cs.Numeric(), DataType.Float32); (col("Id"), DataType.Int32) ])

fsharp
member Cast(dtypes: seq<(string * DataType)>, ?strict: bool) : LazyFrame
member Cast(dtype: DataType, ?strict: bool) : LazyFrame
member Cast(expr: Expr, dtype: DataType, ?strict: bool) : LazyFrame
member Cast(dtypes: seq<(Expr * DataType)>, ?strict: bool) : LazyFrame

Parameters

NameTypeDescription
dtypesseq<(string * DataType)> / seq<(Expr * DataType)>-
strictbool (optional)-
dtypeDataType-
exprExpr-

Clear ​

Create an empty (n=0) or n-row null-filled (n>0) copy of the LazyFrame. Returns a n-row null-filled LazyFrame with an identical schema.

fsharp
member Clear(?n: int64) : LazyFrame

Parameters

NameTypeDescription
nint64 (optional)Number of (null-filled) rows to return in the cleared frame.

Returns: A new LazyFrame.


Clone ​

fsharp
member Clone : unit -> LazyFrame

Collect ​

Execute the plan and return a DataFrame.

fsharp
member Collect(?engine: Engine) : DataFrame

Parameters

NameTypeDescription
engineEngine (optional)-

CollectAsync ​

fsharp
member CollectAsync(?engine: Engine, ?cancellationToken: CancellationToken) : Task<DataFrame>

Parameters

NameTypeDescription
engineEngine (optional)-
cancellationTokenCancellationToken (optional)-

CollectBatchesAsync ​

Streams materialized DataFrame batches asynchronously using the native Polars streaming batch engine. Native memory consumption is strictly bounded by O(batch) size.

fsharp
member CollectBatchesAsync(
    ?chunkSize: int64,
    ?engine: Engine,
    ?maintainOrder: bool,
    ?cancellationToken: CancellationToken
) : IAsyncEnumerable<DataFrame>

Parameters

NameTypeDescription
chunkSizeint64 (optional)Maximum row count per native batch (0 uses Polars default batch size).
engineEngine (optional)Execution engine selection.
maintainOrderbool (optional)Whether to enforce deterministic row ordering across batches.
cancellationTokenCancellationToken (optional)Optional cooperative cancellation token.

Returns: An asynchronous stream of DataFrame batches.


CollectSchema ​

fsharp
member CollectSchema : unit -> PolarsSchema

Count ​

Return the number of non-null elements for each column.

fsharp
member Count : unit -> LazyFrame

Describe ​

Generate a summary statistics DataFrame (count, mean, std, min, 25%, 50%, 75%, max). Similar to pandas/polars describe(). Notice: This will collect LazyFrame once, but LazyFrame won't be consumed.

fsharp
member Describe : unit -> DataFrame

Drop ​

Drop selected columns by selector.

Drop selected columns by column names.

Drop columns by specific Expressions.

fsharp
member Drop(selector: Selector) : LazyFrame
member Drop([<ParamArray>] columns: string[]) : LazyFrame
member Drop(columns: 'a) : LazyFrame
member Drop(exprs: seq<Expr>) : LazyFrame
member Drop([<ParamArray>] exprs: Expr[]) : LazyFrame

Parameters

NameTypeDescription
selectorSelector-
columnsstring[] / 'a-
exprsseq<Expr> / Expr[]-

DropNans ​

Drop rows containing one or more NaN values.

Drop rows with NaN in specific columns.

Drop rows with NaN by specific Expressions.

fsharp
member DropNans(?subset: Selector) : LazyFrame
member DropNans([<ParamArray>] subset: string[]) : LazyFrame
member DropNans([<ParamArray>] exprs: Expr[]) : LazyFrame

Parameters

NameTypeDescription
subsetSelector (optional) / string[]-
exprsExpr[]-

DropNulls ​

Drop rows containing one or more Null values.

Drop rows with Nulls in specific columns.

Drop rows with Nulls by specific Expressions.

fsharp
member DropNulls(?subset: Selector) : LazyFrame
member DropNulls([<ParamArray>] subset: string[]) : LazyFrame
member DropNulls([<ParamArray>] exprs: Expr[]) : LazyFrame

Parameters

NameTypeDescription
subsetSelector (optional) / string[]-
exprsExpr[]-

Explain ​

Print the query plan.

fsharp
member Explain(?optimized: bool) : string

Parameters

NameTypeDescription
optimizedbool (optional)-

Explode ​

fsharp
member Explode(selector: Selector, ?emptyAsNull: bool, ?keepNulls: bool) : LazyFrame
member Explode(columns: seq<string>) : LazyFrame
member Explode(column: string) : LazyFrame

Parameters

NameTypeDescription
selectorSelector-
emptyAsNullbool (optional)-
keepNullsbool (optional)-
columnsseq<string>-
columnstring-

FillNan ​

Fill NaN values in floating point columns with a specified Expression.

fsharp
member FillNan(fillValue: Expr) : LazyFrame

Parameters

NameTypeDescription
fillValueExpr-

FillNull ​

Fill null values in all columns with a specified Expression.

fsharp
member FillNull(fillValue: Expr) : LazyFrame

Parameters

NameTypeDescription
fillValueExpr-

Filter ​

Filter rows based on a boolean expression.

In a LazyFrame, this operation is added to the logical plan and is optimized before execution. Polars will attempt to push this filter down as close to the data source as possible (Predicate Pushdown).

fsharp
member Filter(expr: Expr) : LazyFrame
member Filter(series: Series) : LazyFrame
member Filter(mask: seq<bool>) : LazyFrame

Parameters

NameTypeDescription
exprExpr-
seriesSeries-
maskseq<bool>-

First ​

fsharp
member First : unit -> LazyFrame

Gather ​

Selects rows from this LazyFrame at the given indices.

fsharp
member Gather(index: seq<int64>, ?nullOnOutOfBounds: bool) : LazyFrame

Parameters

NameTypeDescription
indexseq<int64>The indices of the rows to select.
nullOnOutOfBoundsbool (optional)If true when an index is out-of-bounds a null row will be generated instead of raising an error.

GatherEvery ​

Take every nth row in the Frame and return as a new Frame.

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

Parameters

NameTypeDescription
nuint64Gather every n-th row.
offsetuint64 (optional)Starting Index

GroupBy ​

Start a GroupBy operation.

fsharp
member GroupBy(keys: seq<'a>, ?maintainOrder: bool) : LazyGroupBy

Parameters

NameTypeDescription
keysseq<'a>-
maintainOrderbool (optional)-

GroupByDynamic ​

Start a dynamic group-by (rolling window) operation. Returns a Builder.

fsharp
member GroupByDynamic(
    indexCol: string,
    every: Dur,
    ?period: Dur,
    ?offset: Dur,
    ?by: seq<'a>,
    ?label: Label,
    ?includeBoundaries: bool,
    ?closedWindow: ClosedInterval,
    ?startBy: StartBy
) : LazyGroupBy

Parameters

NameTypeDescription
indexColstring-
everyDur-
periodDur (optional)-
offsetDur (optional)-
byseq<'a> (optional)-
labelLabel (optional)-
includeBoundariesbool (optional)-
closedWindowClosedInterval (optional)-
startByStartBy (optional)-

GroupByRolling ​

Start a rolling group-by operation. Returns a Builder.

fsharp
member GroupByRolling(
    indexCol: string,
    period: Dur,
    ?offset: Dur,
    ?by: seq<'a>,
    ?closedWindow: ClosedInterval
) : LazyGroupBy

Parameters

NameTypeDescription
indexColstring-
periodDur-
offsetDur (optional)-
byseq<'a> (optional)-
closedWindowClosedInterval (optional)-

fsharp
member Head(?n: uint32) : LazyFrame

Parameters

NameTypeDescription
nuint32 (optional)-

Interpolate ​

Interpolate intermediate values. The interpolation method is linear. Nulls at the beginning and end of the series remain null.

fsharp
member Interpolate : unit -> LazyFrame

Join ​

Join with another LazyFrame using column names.

fsharp
member Join(
    other: LazyFrame,
    leftOn: seq<Expr>,
    rightOn: seq<Expr>,
    how: JoinType,
    ?suffix: string,
    ?validation: JoinValidation,
    ?coalesce: JoinCoalesce,
    ?maintainOrder: JoinMaintainOrder,
    ?joinSide: JoinSide,
    ?nullsEqual: bool,
    ?sliceOffset: int64,
    ?sliceLen: uint64
) : LazyFrame

member Join(
    other: LazyFrame,
    on: seq<Expr>,
    how: JoinType,
    ?suffix: string,
    ?validation: JoinValidation,
    ?coalesce: JoinCoalesce,
    ?maintainOrder: JoinMaintainOrder,
    ?joinSide: JoinSide,
    ?nullsEqual: bool,
    ?sliceOffset: int64,
    ?sliceLen: uint64
) : LazyFrame

Parameters

NameTypeDescription
otherLazyFrameThe right DataFrame to join with.
leftOnseq<Expr>Column names in the left DataFrame to join on.
rightOnseq<Expr>Column names in the right DataFrame to join on.
howJoinTypeType of join (Inner, Left, Outer, Cross, etc.). Default is Inner.
suffixstring (optional)Suffix to append to columns with same name in right DataFrame. Default "_right".
validationJoinValidation (optional)Check if join keys are unique.
coalesceJoinCoalesce (optional)How to coalesce the join keys.
maintainOrderJoinMaintainOrder (optional)How to maintain the order of the join.
joinSideJoinSide (optional)Specifies the strategy for the hash join build side.
nullsEqualbool (optional)Consider nulls as equal.
sliceOffsetint64 (optional)Slice the result starting at this offset.
sliceLenuint64 (optional)Length of the slice.
onseq<Expr>-

JoinAsOf ​

Perform an As-of join (also known as a time-series join).

This is similar to a left join except that we match on nearest key rather than equal keys. The join keys must be sorted.

fsharp
member JoinAsOf(
    other: LazyFrame,
    leftOn: Expr,
    rightOn: Expr,
    tolerance: Tolerance,
    ?strategy: AsofStrategy,
    ?byLeft: seq<Expr>,
    ?byRight: seq<Expr>,
    ?allowEq: bool,
    ?checkSorted: bool,
    ?suffix: string,
    ?validation: JoinValidation,
    ?coalesce: JoinCoalesce,
    ?maintainOrder: JoinMaintainOrder,
    ?joinSide: JoinSide,
    ?nullsEqual: bool,
    ?sliceOffset: int64,
    ?sliceLen: uint64
) : LazyFrame

Parameters

NameTypeDescription
otherLazyFrameThe right LazyFrame to join with.
leftOnExprJoin key of the left LazyFrame. Must be sorted.
rightOnExprJoin key of the right LazyFrame. Must be sorted.
toleranceToleranceTolerance as a time duration string (e.g., "2h", "10s", "1d"), int or double or TimeSpan. Matches that are further away than this duration are discarded.
strategyAsofStrategy (optional)The strategy to determine which value is "nearest" (Backward, Forward, or Nearest). Defaults to AsofStrategy.Backward.
byLeftseq<Expr> (optional)-
byRightseq<Expr> (optional)-
allowEqbool (optional)If true, allow exact matches to be included in the result. If false, a match must be strictly unequal (e.g. less than for Backward strategy) to the key.
checkSortedbool (optional)Check if the join keys are sorted. If false, the user must ensure keys are sorted; otherwise results are undefined (but execution is faster).
suffixstring (optional)Suffix to append to columns with name conflicts. Defaults to "_right".
validationJoinValidation (optional)Check if join keys are unique (mostly relevant for the 'by' columns).
coalesceJoinCoalesce (optional)How to coalesce the join keys.
maintainOrderJoinMaintainOrder (optional)How to maintain the order of the join.
joinSideJoinSide (optional)pecifies the strategy for the hash join build side.
nullsEqualbool (optional)Consider nulls as equal.
sliceOffsetint64 (optional)Slice the result starting at this offset (optimization).
sliceLenuint64 (optional)Length of the slice to keep.

JoinWhere ​

Join with another LazyFrame using multiple boolean expressions.

fsharp
member JoinWhere(
    other: LazyFrame,
    predicates: seq<Expr>,
    ?how: JoinType,
    ?suffix: string,
    ?validation: JoinValidation,
    ?coalesce: JoinCoalesce,
    ?maintainOrder: JoinMaintainOrder,
    ?nullsEqual: bool
) : LazyFrame

Parameters

NameTypeDescription
otherLazyFrame-
predicatesseq<Expr>-
howJoinType (optional)-
suffixstring (optional)-
validationJoinValidation (optional)-
coalesceJoinCoalesce (optional)-
maintainOrderJoinMaintainOrder (optional)-
nullsEqualbool (optional)-

Last ​

Get the last row.

fsharp
member Last : unit -> LazyFrame

Limit ​

Get the first n rows.

fsharp
member Limit(?n: uint32) : LazyFrame

Parameters

NameTypeDescription
nuint32 (optional)Number of rows to return.

MatchToSchema ​

fsharp
member MatchToSchema(
    schema: PolarsSchema,
    ?extraColumns: ExtraColumnsPolicy,
    ?defaultConfig: MatchSchemaConfig,
    ?columnOverrides: Map<string, MatchSchemaConfig>
) : LazyFrame

Parameters

NameTypeDescription
schemaPolarsSchema-
extraColumnsExtraColumnsPolicy (optional)-
defaultConfigMatchSchemaConfig (optional)-
columnOverridesMap<string, MatchSchemaConfig> (optional)-

Max ​

Aggregate the columns in the Frame to their maximum value.

fsharp
member Max : unit -> LazyFrame

Mean ​

Aggregate the columns in the Frame to their mean value.

fsharp
member Mean : unit -> LazyFrame

Median ​

Aggregate the columns in the Frame to their median value.

fsharp
member Median : unit -> LazyFrame

Melt ​

fsharp
member Melt(
    index: Selector,
    on: Selector,
    variableName: string,
    valueName: string
) : LazyFrame

member Melt(
    index: seq<string>,
    on: seq<string>,
    ?variableName: string,
    ?valueName: string
) : LazyFrame

Parameters

NameTypeDescription
indexSelector / seq<string>-
onSelector / seq<string>-
variableNamestring / string (optional)-
valueNamestring / string (optional)-

Merge ​

Initiates a Merge (upsert) plan using this LazyFrame as the target and the given source. The on selector is expanded against the target to determine the join keys.

fsharp
member Merge(source: LazyFrame, on: IColumnExpr) : MergePlan

Parameters

NameTypeDescription
sourceLazyFrameThe source LazyFrame containing updates/inserts.
onIColumnExprA column expression (e.g., pl.col "Id") or selector (e.g., pl.cs.endsWith "Id") that resolves to the merge key columns.

Returns: A MergePlan that can be further configured and then executed.


MergeCatalogRecords ​

Starts building a Merge (Upsert) operation using this LazyFrame as the source.

fsharp
member MergeCatalogRecords(
    catalog: UnityCatalog,
    catalogName: string,
    schemaName: string,
    tableName: string,
    mergeKeys: string[],
    ?canEvolve: bool,
    ?cloudOptions: CloudOptions
) : DeltaMergeBuilder

Parameters

NameTypeDescription
catalogUnityCatalog-
catalogNamestring-
schemaNamestring-
tableNamestring-
mergeKeysstring[]-
canEvolvebool (optional)-
cloudOptionsCloudOptions (optional)-

MergeDeltaOrdered ​

Starts a fluent builder to merge a LazyFrame into a Delta Lake table with strict, order-preserving SQL MERGE semantics.

Unlike traditional merge methods, this builder guarantees that chained actions (Update, Delete, Insert) are evaluated exactly in the order they are defined. If no actions are specified before execution, it intelligently defaults to a standard Upsert (WhenMatchedUpdate + WhenNotMatchedInsert).

fsharp
member MergeDeltaOrdered(
    path: string,
    mergeKeys: seq<string>,
    ?canEvolve: bool,
    ?cloudOptions: CloudOptions
) : DeltaMergeBuilder

Parameters

NameTypeDescription
pathstringThe URI to the target Delta Lake table (local or cloud).
mergeKeysseq<string>The column names to join on (must exist in both the Source DataFrame and Target Delta table).
canEvolvebool (optional)If set to true, allows schema evolution (e.g., adding new columns from the Source to the Target). Default is false.
cloudOptionsCloudOptions (optional)Cloud storage credentials and configuration (e.g., AWS S3, Azure Blob).

Returns: A DeltaMergeBuilder instance used to chain match conditions, culminating in a call to .Execute().


MergeSorted ​

Take two sorted DataFrames and merge them by the sorted key. The output of this operation will also be sorted. It is the callers responsibility that the frames are sorted in ascending order by the key, with null keys at the end, otherwise the order of the output will not make sense. The schemas of both LazyFrames must be equal.

fsharp
member MergeSorted(other: LazyFrame, key: string, ?maintainOrder: bool) : LazyFrame
member MergeSorted(other: LazyFrame, key: string[], ?maintainOrder: bool) : LazyFrame

Parameters

NameTypeDescription
otherLazyFrameOther DataFrame that must be merged
keystring / string[]Key that is sorted.
maintainOrderbool (optional)If True, the output is guaranteed to have left-biased ordering for equal keys: rows from the left frame appear before rows from the right frame when their keys are equal.

Min ​

Aggregate the columns in the Frame to their minimum value.

fsharp
member Min : unit -> LazyFrame

NullCount ​

Aggregate the columns in the Frame as the sum of their null value count.

fsharp
member NullCount : unit -> LazyFrame

Orderby ​

fsharp
member Orderby(expr: Expr, desc: bool) : LazyFrame

Parameters

NameTypeDescription
exprExpr-
descbool-

Pipe ​

Offers a structured way to apply a sequence of user-defined functions (UDFs).

fsharp
member Pipe(func: (LazyFrame -> 'T)) : 'T

Parameters

NameTypeDescription
func(LazyFrame -> 'T)A function that receives the current expression and returns a value of type T. Typically this function wraps several Polars API calls that operate on the given expression.

Returns: The result of applying function to this LazyFrame.


PipeWithSchema ​

Allows to alter the lazy frame during the plan stage with the resolved schema.

In contrast to pipe, this method does not execute function immediately but only during the plan stage. This allows to use the resolved schema of the input to dynamically alter the lazy frame. This also means that any exceptions raised by function will only be emitted during the plan stage.

fsharp
member PipeWithSchema(func: (LazyFrame -> (PolarsSchema -> LazyFrame))) : LazyFrame

Parameters

NameTypeDescription
func(LazyFrame -> (PolarsSchema -> LazyFrame))Callable; will receive the frame as the first parameter and the resolved schema as the second parameter.

Pivot ​

Pivot the LazyFrame.

Important: Lazy pivot requires an eager onColumns DataFrame to determine the output schema (column names) during the planning phase.

Pivot the LazyFrame using column names.

Pivot the LazyFrame using column names and a custom aggregation expression.

fsharp
member Pivot(
    index: Selector,
    columns: Selector,
    values: Selector,
    onColumns: DataFrame,
    ?aggregateExpr: Expr,
    ?aggregateFunction: PivotAgg,
    ?maintainOrder: bool,
    ?separator: string,
    ?columnNaming: PivotColumnNaming
) : LazyFrame

member Pivot(
    index: seq<string>,
    columns: seq<string>,
    values: seq<string>,
    onColumns: DataFrame,
    ?aggregateFunction: PivotAgg,
    ?maintainOrder: bool,
    ?separator: string,
    ?columnNaming: PivotColumnNaming
) : LazyFrame

member Pivot(
    index: seq<string>,
    columns: seq<string>,
    values: seq<string>,
    onColumns: DataFrame,
    aggregateExpr: Expr,
    ?maintainOrder: bool,
    ?separator: string,
    ?columnNaming: PivotColumnNaming
) : LazyFrame

Parameters

NameTypeDescription
indexSelector / seq<string>Selector for the index column(s) (the rows).
columnsSelector / seq<string>Selector for the column(s) to pivot (the new column headers).
valuesSelector / seq<string>Selector for the value column(s) to populate the cells.
onColumnsDataFrameAn Eager DataFrame containing the unique values of the columns. This is strictly used for schema inference.
aggregateExprExpr (optional)Optional expression to aggregate the values. If null, uses aggregateFunction.
aggregateFunctionPivotAgg (optional)Aggregation function to use if aggregateExpr is null. Default is First.
maintainOrderbool (optional)Sort the result by the index column.
separatorstring (optional)Separator used to combine column names when multiple value columns are selected.
columnNamingPivotColumnNaming (optional)Controls how column names are constructed. Default is Auto.

Returns: A new LazyFrame with the pivot operation applied.


PrintSchema ​

fsharp
member PrintSchema : unit -> unit

Quantile ​

Aggregate the columns in the Frame to their quantile value.

fsharp
member Quantile(quantile: float, ?method: QuantileMethod) : LazyFrame

Parameters

NameTypeDescription
quantilefloatQuantile between 0.0 and 1.0.
methodQuantileMethod (optional)['nearest’, ‘higher’, ‘lower’, ‘midpoint’, ‘linear’] Interpolation method.

Remove ​

Remove rows that match the predicate. This is the exact opposite of Filter. Rows where the predicate evaluates to False or Null are kept.

fsharp
member Remove(predicate: Expr) : LazyFrame
member Remove(predicate: Series) : LazyFrame
member Remove(mask: seq<bool>) : LazyFrame

Parameters

NameTypeDescription
predicateExpr / Series-
maskseq<bool>-

Rename ​

Rename the lazyframe columns using a sequence of (oldName, newName) tuples. Example: lf.Rename [ "colA", "col1"; "colB", "col2" ]

Rename the lazyframe columns using a dictionary mapping old column names to new column names. Example: lf.Rename (dict [ "colA", "col1"; "colB", "col2" ])

fsharp
member Rename(mapping: seq<(string * string)>, ?strict: bool) : LazyFrame
member Rename(mapping: IReadOnlyDictionary<string, string>, ?strict: bool) : LazyFrame

Parameters

NameTypeDescription
mappingseq<(string * string)> / IReadOnlyDictionary<string, string>A sequence of key-value pairs representing (oldName, newName).
strictbool (optional)If true, an error is raised if any column in mapping is not found in the schema. If false, columns that are not found are silently ignored. Default is true.

Reverse ​

Reverse the LazyFrame.

fsharp
member Reverse : unit -> LazyFrame

RowsAsync ​

Streams LazyFrame rows asynchronously as strongly-typed F# Records/Tuples/DTOs. Serves as the asynchronous counterpart to DataFrame.Rows<'T>().

fsharp
member RowsAsync(
    ?chunkSize: int64,
    ?engine: Engine,
    ?maintainOrder: bool,
    ?cancellationToken: CancellationToken
) : IAsyncEnumerable<'T>

Parameters

NameTypeDescription
chunkSizeint64 (optional)-
engineEngine (optional)-
maintainOrderbool (optional)-
cancellationTokenCancellationToken (optional)-

Select ​

Select columns from the lazyframe using a sequence of column expressions.

Select columns from the lazyframe using a selector.

fsharp
member Select(expr: Expr) : LazyFrame
member Select(selector: Selector) : LazyFrame
member Select(exprs: seq<Expr>) : LazyFrame
member Select(columns: seq<'a>) : LazyFrame

Parameters

NameTypeDescription
exprExpr-
selectorSelector-
exprsseq<Expr>-
columnsseq<'a>-

SetSorted ​

Mark one or multiple columns as sorted. This is an optimizer hint and will not actually execute a sorting operation.

fsharp
member SetSorted(columns: Selector, ?descending: bool, ?nullsLast: bool) : LazyFrame

Parameters

NameTypeDescription
columnsSelectorThe columns to mark as sorted. Accepts strings, arrays, or Selectors (e.g. Cs.Temporal()).
descendingbool (optional)Whether the columns are sorted in descending order.
nullsLastbool (optional)Whether null values appear last.

Returns: A new LazyFrame with the sorted hints applied to the query plan.


Show ​

Print the LazyFrame to Console (Stdout).

fsharp
member Show : unit -> unit

SinkBatches ​

Stream the query result in batches. This executes the query and calls 'onBatch' for each RecordBatch produced.

fsharp
member SinkBatches(onBatch: Action<RecordBatch>) : unit

Parameters

NameTypeDescription
onBatchAction<RecordBatch>-

SinkCatalogTable ​

Sinks the LazyFrame to a Unity Catalog table.

fsharp
member SinkCatalogTable(
    catalog: UnityCatalog,
    catalogName: string,
    schemaName: string,
    tableName: string,
    ?partitionBy: Selector,
    ?mode: DeltaSaveMode,
    ?canEvolve: bool,
    ?includeKeys: bool,
    ?keysPreGrouped: bool,
    ?maxRowsPerFile: int,
    ?approxBytesPerFile: int64,
    ?compression: ParquetCompression,
    ?compressionLevel: int,
    ?statistics: bool,
    ?rowGroupSize: uint32,
    ?dataPageSize: uint32,
    ?compatLevel: int,
    ?maintainOrder: bool,
    ?syncOnClose: SyncOnClose,
    ?mkdir: bool,
    ?cloudOptions: CloudOptions
) : unit

Parameters

NameTypeDescription
catalogUnityCatalog-
catalogNamestring-
schemaNamestring-
tableNamestring-
partitionBySelector (optional)-
modeDeltaSaveMode (optional)-
canEvolvebool (optional)-
includeKeysbool (optional)-
keysPreGroupedbool (optional)-
maxRowsPerFileint (optional)-
approxBytesPerFileint64 (optional)-
compressionParquetCompression (optional)-
compressionLevelint (optional)-
statisticsbool (optional)-
rowGroupSizeuint32 (optional)-
dataPageSizeuint32 (optional)-
compatLevelint (optional)-
maintainOrderbool (optional)-
syncOnCloseSyncOnClose (optional)-
mkdirbool (optional)-
cloudOptionsCloudOptions (optional)-

SinkCsv ​

Execute the LazyFrame and sink the result to a CSV file.

This operation allows processing datasets larger than memory by streaming results directly to the file system.

fsharp
member SinkCsv(
    path: string,
    ?includeHeader: bool,
    ?includeBom: bool,
    ?separator: char,
    ?quoteChar: char,
    ?quoteStyle: QuoteStyle,
    ?nullValue: string,
    ?lineTerminator: string,
    ?floatScientific: bool,
    ?floatPrecision: int,
    ?decimalComma: bool,
    ?dateFormat: string,
    ?timeFormat: string,
    ?datetimeFormat: string,
    ?checkExtension: bool,
    ?compression: ExternalCompression,
    ?compressionLevel: int,
    ?maintainOrder: bool,
    ?syncOnClose: SyncOnClose,
    ?mkdir: bool,
    ?batchSize: int,
    ?cloudOptions: CloudOptions
) : unit

Parameters

NameTypeDescription
pathstring-
includeHeaderbool (optional)-
includeBombool (optional)-
separatorchar (optional)-
quoteCharchar (optional)-
quoteStyleQuoteStyle (optional)-
nullValuestring (optional)-
lineTerminatorstring (optional)-
floatScientificbool (optional)-
floatPrecisionint (optional)-
decimalCommabool (optional)-
dateFormatstring (optional)-
timeFormatstring (optional)-
datetimeFormatstring (optional)-
checkExtensionbool (optional)-
compressionExternalCompression (optional)-
compressionLevelint (optional)-
maintainOrderbool (optional)-
syncOnCloseSyncOnClose (optional)-
mkdirbool (optional)-
batchSizeint (optional)-
cloudOptionsCloudOptions (optional)-

SinkCsvMemory ​

Sink the LazyFrame to a CSV format in memory.

This allows for streaming execution directly into a byte array without writing to disk.

fsharp
member SinkCsvMemory(
    ?includeBom: bool,
    ?includeHeader: bool,
    ?batchSize: int,
    ?checkExtension: bool,
    ?compressionCode: ExternalCompression,
    ?compressionLevel: int,
    ?dateFormat: string,
    ?timeFormat: string,
    ?datetimeFormat: string,
    ?floatScientific: int,
    ?floatPrecision: int,
    ?decimalComma: bool,
    ?separator: byte,
    ?quoteChar: byte,
    ?nullValue: string,
    ?lineTerminator: string,
    ?quoteStyle: QuoteStyle,
    ?maintainOrder: bool
) : byte[]

Parameters

NameTypeDescription
includeBombool (optional)-
includeHeaderbool (optional)-
batchSizeint (optional)-
checkExtensionbool (optional)-
compressionCodeExternalCompression (optional)-
compressionLevelint (optional)-
dateFormatstring (optional)-
timeFormatstring (optional)-
datetimeFormatstring (optional)-
floatScientificint (optional)-
floatPrecisionint (optional)-
decimalCommabool (optional)-
separatorbyte (optional)-
quoteCharbyte (optional)-
nullValuestring (optional)-
lineTerminatorstring (optional)-
quoteStyleQuoteStyle (optional)-
maintainOrderbool (optional)-

Returns: A byte array containing the serialized CSV data.


SinkCsvPartitioned ​

Execute the LazyFrame and sink the result to a CSV file, partitioned by the given selector.

fsharp
member SinkCsvPartitioned(
    path: string,
    partitionBy: Selector,
    ?includeKeys: bool,
    ?keysPreGrouped: bool,
    ?maxRowsPerFile: int,
    ?approxBytesPerFile: int64,
    ?includeHeader: bool,
    ?includeBom: bool,
    ?separator: char,
    ?quoteChar: char,
    ?quoteStyle: QuoteStyle,
    ?nullValue: string,
    ?lineTerminator: string,
    ?floatScientific: bool,
    ?floatPrecision: int,
    ?decimalComma: bool,
    ?dateFormat: string,
    ?timeFormat: string,
    ?datetimeFormat: string,
    ?checkExtension: bool,
    ?compression: ExternalCompression,
    ?compressionLevel: int,
    ?maintainOrder: bool,
    ?syncOnClose: SyncOnClose,
    ?mkdir: bool,
    ?batchSize: int,
    ?cloudOptions: CloudOptions
) : unit

Parameters

NameTypeDescription
pathstring-
partitionBySelector-
includeKeysbool (optional)-
keysPreGroupedbool (optional)-
maxRowsPerFileint (optional)-
approxBytesPerFileint64 (optional)-
includeHeaderbool (optional)-
includeBombool (optional)-
separatorchar (optional)-
quoteCharchar (optional)-
quoteStyleQuoteStyle (optional)-
nullValuestring (optional)-
lineTerminatorstring (optional)-
floatScientificbool (optional)-
floatPrecisionint (optional)-
decimalCommabool (optional)-
dateFormatstring (optional)-
timeFormatstring (optional)-
datetimeFormatstring (optional)-
checkExtensionbool (optional)-
compressionExternalCompression (optional)-
compressionLevelint (optional)-
maintainOrderbool (optional)-
syncOnCloseSyncOnClose (optional)-
mkdirbool (optional)-
batchSizeint (optional)-
cloudOptionsCloudOptions (optional)-

SinkDelta ​

Sink the LazyFrame to a Delta Lake table with partition discovery.

This operation performs a "blind write" of partitioned Parquet files (Hive-style) and then commits a transaction to the Delta Log, registering the new files.

fsharp
member SinkDelta(
    path: string,
    ?partitionBy: Selector,
    ?mode: DeltaSaveMode,
    ?canEvolve: bool,
    ?includeKeys: bool,
    ?keysPreGrouped: bool,
    ?maxRowsPerFile: int,
    ?approxBytesPerFile: int64,
    ?compression: ParquetCompression,
    ?compressionLevel: int,
    ?statistics: bool,
    ?rowGroupSize: uint32,
    ?dataPageSize: uint32,
    ?compatLevel: int,
    ?maintainOrder: bool,
    ?syncOnClose: SyncOnClose,
    ?mkdir: bool,
    ?cloudOptions: CloudOptions
) : unit

Parameters

NameTypeDescription
pathstringPath to the root of the Delta Table. Can be local (e.g. "./data/table") or remote (e.g. "s3://bucket/table").
partitionBySelector (optional)The selector(s) to partition the data by. Directories will be created in the format "col=value".
modeDeltaSaveMode (optional)Save mode (Append, Overwrite, ErrorIfExists, Ignore). Default is Append.
canEvolvebool (optional)-
includeKeysbool (optional)Whether to include the partition keys in the Parquet files themselves. Default is true (recommended for Delta Lake compatibility).
keysPreGroupedbool (optional)Assert that the keys are already pre-grouped. This can speed up the operation if true.
maxRowsPerFileint (optional)Maximum number of rows per file. 0 means no limit.
approxBytesPerFileint64 (optional)Approximate size in bytes per file. 0 means no limit.
compressionParquetCompression (optional)Compression codec to use (Snappy, Zstd, etc.).
compressionLevelint (optional)Compression level (depends on the codec).
statisticsbool (optional)Write statistics to the Parquet file. Delta Lake uses these stats for data skipping, so 'true' is highly recommended.
rowGroupSizeuint32 (optional)Target row group size (in rows).
dataPageSizeuint32 (optional)Target data page size (in bytes).
compatLevelint (optional)IPC format compatibility.
maintainOrderbool (optional)Maintain the order of the data.
syncOnCloseSyncOnClose (optional)Whether to sync the file to disk on close.
mkdirbool (optional)Create parent directories if they don't exist.
cloudOptionsCloudOptions (optional)Options for cloud storage authentication and configuration.

SinkIpc ​

Sink the LazyFrame to an IPC (Arrow) file.

This allows for streaming execution.

fsharp
member SinkIpc(
    path: string,
    ?compression: IpcCompression,
    ?compatLevel: int,
    ?recordBatchSize: int,
    ?recordBatchStatistics: bool,
    ?maintainOrder: bool,
    ?syncOnClose: SyncOnClose,
    ?mkdir: bool,
    ?cloudOptions: CloudOptions
) : unit

Parameters

NameTypeDescription
pathstringOutput file path.
compressionIpcCompression (optional)Compression method (NoCompression, LZ4, ZSTD). Defaults to NoCompression.
compatLevelint (optional)Arrow compatibility level. -1 means newest. Defaults to -1.
recordBatchSizeint (optional)Number of rows per record batch (0 = default).
recordBatchStatisticsbool (optional)Write statistics to the record batch header. Defaults to true.
maintainOrderbool (optional)Whether to maintain the order of the data. Defaults to true.
syncOnCloseSyncOnClose (optional)File synchronization behavior on close. Defaults to None.
mkdirbool (optional)Recursively create the directory if it does not exist. Defaults to false.
cloudOptionsCloudOptions (optional)Options for cloud storage.

SinkIpcMemory ​

Sink the LazyFrame to an IPC (Arrow) format in memory.

This allows for streaming execution directly into a byte array without writing to disk.

fsharp
member SinkIpcMemory(
    ?compression: IpcCompression,
    ?compatLevel: int,
    ?recordBatchSize: int,
    ?recordBatchStatistics: bool,
    ?maintainOrder: bool
) : byte[]

Parameters

NameTypeDescription
compressionIpcCompression (optional)-
compatLevelint (optional)-
recordBatchSizeint (optional)-
recordBatchStatisticsbool (optional)-
maintainOrderbool (optional)-

SinkIpcPartitioned ​

Sink the LazyFrame to an IPC (Arrow) file, partitioned by the given selector.

fsharp
member SinkIpcPartitioned(
    path: string,
    partitionBy: Selector,
    ?includeKeys: bool,
    ?keysPreGrouped: bool,
    ?maxRowsPerFile: int,
    ?approxBytesPerFile: int64,
    ?compression: IpcCompression,
    ?compatLevel: int,
    ?recordBatchSize: int,
    ?recordBatchStatistics: bool,
    ?maintainOrder: bool,
    ?syncOnClose: SyncOnClose,
    ?mkdir: bool,
    ?cloudOptions: CloudOptions
) : unit

Parameters

NameTypeDescription
pathstring-
partitionBySelectorThe selector(s) to partition the data by.
includeKeysbool (optional)Whether to include the partition keys in the output files.
keysPreGroupedbool (optional)Assert that the keys are already pre-grouped. This can speed up the operation if true. Use with caution: if the data is not grouped, the output may be incorrect.
maxRowsPerFileint (optional)Maximum number of rows per file. 0 means no limit.
approxBytesPerFileint64 (optional)Approximate size in bytes per file. 0 means no limit.
compressionIpcCompression (optional)-
compatLevelint (optional)-
recordBatchSizeint (optional)-
recordBatchStatisticsbool (optional)-
maintainOrderbool (optional)-
syncOnCloseSyncOnClose (optional)-
mkdirbool (optional)-
cloudOptionsCloudOptions (optional)-

SinkJson ​

Sink the LazyFrame to a NDJSON (Newline Delimited JSON) file.

fsharp
member SinkJson(
    path: string,
    ?compression: ExternalCompression,
    ?compressionLevel: int,
    ?checkExtension: bool,
    ?maintainOrder: bool,
    ?syncOnClose: SyncOnClose,
    ?mkdir: bool,
    ?cloudOptions: CloudOptions
) : unit

Parameters

NameTypeDescription
pathstringOutput file path.
compressionExternalCompression (optional)Compression method (Gzip/Zstd).
compressionLevelint (optional)Compression level.
checkExtensionbool (optional)Whether to check if the file extension matches '.json' or '.ndjson'.
maintainOrderbool (optional)Maintain the order of data.
syncOnCloseSyncOnClose (optional)Sync to disk on close.
mkdirbool (optional)Create parent directories.
cloudOptionsCloudOptions (optional)Cloud storage options.

SinkJsonMemory ​

Sink the LazyFrame to a NDJSON (Newline Delimited JSON) format in memory.

fsharp
member SinkJsonMemory(
    ?compression: ExternalCompression,
    ?compressionLevel: int,
    ?checkExtension: bool,
    ?maintainOrder: bool
) : byte[]

Parameters

NameTypeDescription
compressionExternalCompression (optional)-
compressionLevelint (optional)-
checkExtensionbool (optional)-
maintainOrderbool (optional)-

Returns: A byte array containing the serialized NDJSON data.


SinkJsonPartitioned ​

Sink the LazyFrame to a NDJSON (Newline Delimited JSON) file, partitioned by the given selector.

fsharp
member SinkJsonPartitioned(
    path: string,
    partitionBy: Selector,
    ?includeKeys: bool,
    ?keysPreGrouped: bool,
    ?maxRowsPerFile: int,
    ?approxBytesPerFile: int64,
    ?compression: ExternalCompression,
    ?compressionLevel: int,
    ?checkExtension: bool,
    ?maintainOrder: bool,
    ?syncOnClose: SyncOnClose,
    ?mkdir: bool,
    ?cloudOptions: CloudOptions
) : unit

Parameters

NameTypeDescription
pathstring-
partitionBySelector-
includeKeysbool (optional)-
keysPreGroupedbool (optional)-
maxRowsPerFileint (optional)-
approxBytesPerFileint64 (optional)-
compressionExternalCompression (optional)-
compressionLevelint (optional)-
checkExtensionbool (optional)-
maintainOrderbool (optional)-
syncOnCloseSyncOnClose (optional)-
mkdirbool (optional)-
cloudOptionsCloudOptions (optional)-

SinkNdJson ​

Alias for SinkJson (Lazily evaluated JSON is always NDJSON/JsonLines).

fsharp
member SinkNdJson(
    path: string,
    ?compression: ExternalCompression,
    ?compressionLevel: int,
    ?checkExtension: bool,
    ?maintainOrder: bool,
    ?syncOnClose: SyncOnClose,
    ?mkdir: bool,
    ?cloudOptions: CloudOptions
) : unit

Parameters

NameTypeDescription
pathstring-
compressionExternalCompression (optional)-
compressionLevelint (optional)-
checkExtensionbool (optional)-
maintainOrderbool (optional)-
syncOnCloseSyncOnClose (optional)-
mkdirbool (optional)-
cloudOptionsCloudOptions (optional)-

SinkParquet ​

Sink the LazyFrame to a Parquet file.

This allows for streaming execution, processing the data in chunks and writing it to the file without loading the entire dataset into memory.

fsharp
member SinkParquet(
    path: string,
    ?compression: ParquetCompression,
    ?compressionLevel: int,
    ?statistics: bool,
    ?rowGroupSize: int,
    ?dataPageSize: int,
    ?compatLevel: int,
    ?maintainOrder: bool,
    ?syncOnClose: SyncOnClose,
    ?mkdir: bool,
    ?cloudOptions: CloudOptions
) : unit

Parameters

NameTypeDescription
pathstringPath to the output file.
compressionParquetCompression (optional)Compression codec to use.
compressionLevelint (optional)Compression level (depends on the codec).
statisticsbool (optional)Write statistics to the parquet file.
rowGroupSizeint (optional)Target row group size (in rows).
dataPageSizeint (optional)Target data page size (in bytes).
compatLevelint (optional)IPC format compatibility, -1: oldest, 0: default, 1: newest.
maintainOrderbool (optional)Maintain the order of the data.
syncOnCloseSyncOnClose (optional)Whether to sync the file to disk on close.
mkdirbool (optional)Create parent directories if they don't exist (Local file system only).
cloudOptionsCloudOptions (optional)Options for cloud storage (AWS S3, Azure Blob, GCS, etc.).

SinkParquetMemory ​

Sink the LazyFrame to a Parquet format in memory.

This allows for streaming execution directly into a byte array without writing to disk.

fsharp
member SinkParquetMemory(
    ?compression: ParquetCompression,
    ?compressionLevel: int,
    ?statistics: bool,
    ?rowGroupSize: int,
    ?dataPageSize: int,
    ?compatLevel: int,
    ?maintainOrder: bool
) : byte[]

Parameters

NameTypeDescription
compressionParquetCompression (optional)-
compressionLevelint (optional)-
statisticsbool (optional)-
rowGroupSizeint (optional)-
dataPageSizeint (optional)-
compatLevelint (optional)-
maintainOrderbool (optional)-

Returns: A byte array containing the serialized Parquet data.


SinkParquetPartitioned ​

Sink the LazyFrame to a set of Parquet files, partitioned by the specified selector.

This writes the dataset to a directory, splitting the data into multiple files based on the partition key(s) defined in partitionBy.

fsharp
member SinkParquetPartitioned(
    path: string,
    partitionBy: Selector,
    ?includeKeys: bool,
    ?keysPreGrouped: bool,
    ?maxRowsPerFile: int,
    ?approxBytesPerFile: int64,
    ?compression: ParquetCompression,
    ?compressionLevel: int,
    ?statistics: bool,
    ?rowGroupSize: int,
    ?dataPageSize: int,
    ?compatLevel: int,
    ?maintainOrder: bool,
    ?syncOnClose: SyncOnClose,
    ?mkdir: bool,
    ?cloudOptions: CloudOptions
) : unit

Parameters

NameTypeDescription
pathstring-
partitionBySelector-
includeKeysbool (optional)-
keysPreGroupedbool (optional)-
maxRowsPerFileint (optional)-
approxBytesPerFileint64 (optional)-
compressionParquetCompression (optional)-
compressionLevelint (optional)-
statisticsbool (optional)-
rowGroupSizeint (optional)-
dataPageSizeint (optional)-
compatLevelint (optional)-
maintainOrderbool (optional)-
syncOnCloseSyncOnClose (optional)-
mkdirbool (optional)-
cloudOptionsCloudOptions (optional)-

SinkTo ​

Stream query results directly to a database or other IDataReader consumer. Uses a producer-consumer pattern with bounded capacity for memory efficiency.

fsharp
member SinkTo(writerAction: Action<IDataReader>, ?bufferSize: int, ?typeOverrides: IDictionary<string, Type>) : unit

Parameters

NameTypeDescription
writerActionAction<IDataReader>Callback to consume the IDataReader (e.g., using SqlBulkCopy).
bufferSizeint (optional)Max number of batches to buffer in memory (default: 5).
typeOverridesIDictionary<string, Type> (optional)Force specific C# types for columns (e.g. map Date32 to DateTime).

Slice ​

Slice the LazyFrame along the rows. If length is omitted, it slices to the end of the LazyFrame.

fsharp
member Slice(offset: int64, ?length: uint32) : LazyFrame

Parameters

NameTypeDescription
offsetint64-
lengthuint32 (optional)-

Sort ​

fsharp
member Sort(
    columns: seq<IColumnExpr>,
    descending: seq<bool>,
    nullsLast: seq<bool>,
    ?maintainOrder: bool
) : LazyFrame

member Sort(
    columns: seq<Expr>,
    descending: seq<bool>,
    nullsLast: seq<bool>,
    ?maintainOrder: bool
) : LazyFrame

member Sort(
    columns: seq<IColumnExpr>,
    ?descending: bool,
    ?nullsLast: bool,
    ?maintainOrder: bool
) : LazyFrame

member Sort(
    columns: seq<Expr>,
    ?descending: bool,
    ?nullsLast: bool,
    ?maintainOrder: bool
) : LazyFrame

member Sort(expr: Expr, ?descending: bool, ?nullsLast: bool) : LazyFrame
member Sort(colName: string, ?descending: bool, ?nullsLast: bool) : LazyFrame

Parameters

NameTypeDescription
columnsseq<IColumnExpr> / seq<Expr>-
descendingseq<bool> / bool (optional)-
nullsLastseq<bool> / bool (optional)-
maintainOrderbool (optional)-
exprExpr-
colNamestring-

Std ​

Aggregate the columns in the Frame to their standard deviation value.

fsharp
member Std(?ddof: byte) : LazyFrame

Parameters

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

Sum ​

Aggregate the columns in the Frame to their sum value.

fsharp
member Sum : unit -> LazyFrame

Tail ​

fsharp
member Tail(?n: uint32) : LazyFrame

Parameters

NameTypeDescription
nuint32 (optional)-

ToAsyncEnumerable ​

Executes the LazyFrame via native streaming batch engine, yielding strongly typed F# Records/Tuples/DTOs with O(batch) memory overhead and pull-based backpressure.

fsharp
member ToAsyncEnumerable(
    ?chunkSize: int64,
    ?engine: Engine,
    ?maintainOrder: bool,
    ?cancellationToken: CancellationToken
) : IAsyncEnumerable<'T>

Parameters

NameTypeDescription
chunkSizeint64 (optional)Maximum row count per native batch (0 uses Polars default batch size).
engineEngine (optional)Execution engine selection.
maintainOrderbool (optional)Whether to enforce deterministic row ordering across batches.
cancellationTokenCancellationToken (optional)Optional cooperative cancellation token.

Returns: An asynchronous stream of hydrated F# row items.


ToHtml ​

Generates an HTML visualization of the LazyFrame execution plan and schema for LINQPad.

fsharp
member ToHtml(?optimized: bool) : string

Parameters

NameTypeDescription
optimizedbool (optional)Whether to explain the optimized logical plan.

Returns: An HTML representation formatted with monospace styling.


TopK ​

Get the top k rows based on the given columns. This is often faster than a full sort followed by a head.

fsharp
member TopK(k: int, by: seq<'a>, ?reverse: seq<bool>) : LazyFrame
member TopK(k: int, by: seq<'a>, reverse: bool) : LazyFrame

Parameters

NameTypeDescription
kintNumber of rows to return.
byseq<'a>Columns to sort by.
reverseseq<bool> (optional)Sort direction per column. Default is false (no reverse).

Unique ​

Keep unique rows (stable) based on a subset of columns defined by a Selector.

Keep unique rows based on specific column names.

fsharp
member Unique(?subset: Selector, ?keep: UniqueKeepStrategy, ?maintainOrder: bool) : LazyFrame
member Unique(columns: seq<string>, ?keep: UniqueKeepStrategy, ?maintainOrder: bool) : LazyFrame

Parameters

NameTypeDescription
subsetSelector (optional)-
keepUniqueKeepStrategy (optional)-
maintainOrderbool (optional)-
columnsseq<string>-

Unnest ​

Decompose a struct column into multiple columns.

Helper: Unnest columns by name.

Helper: Unnest a single column by name.

fsharp
member Unnest(selector: Selector, ?separator: string) : LazyFrame
member Unnest(columns: seq<string>, ?separator: string) : LazyFrame
member Unnest(column: string, ?separator: string) : LazyFrame

Parameters

NameTypeDescription
selectorSelector-
separatorstring (optional)-
columnsseq<string>-
columnstring-

Unpivot ​

Unpivot (Melt) the LazyFrame using Selectors. Primary overload backed by native binding.

Unpivot (Melt) overload for simple string lists. Auto-converts to Selectors.

fsharp
member Unpivot(
    index: Selector,
    on: Selector,
    ?variableName: string,
    ?valueName: string
) : LazyFrame

member Unpivot(
    index: seq<string>,
    on: seq<string>,
    ?variableName: string,
    ?valueName: string
) : LazyFrame

Parameters

NameTypeDescription
indexSelector / seq<string>-
onSelector / seq<string>-
variableNamestring (optional)-
valueNamestring (optional)-

Update ​

fsharp
member Update(
    other: LazyFrame,
    ?on: IColumnExpr,
    ?how: JoinType,
    ?leftOn: IColumnExpr,
    ?rightOn: IColumnExpr,
    ?includeNulls: bool,
    ?maintainOrder: JoinMaintainOrder
) : LazyFrame

Parameters

NameTypeDescription
otherLazyFrame-
onIColumnExpr (optional)-
howJoinType (optional)-
leftOnIColumnExpr (optional)-
rightOnIColumnExpr (optional)-
includeNullsbool (optional)-
maintainOrderJoinMaintainOrder (optional)-

Var ​

Aggregate the columns in the Frame to their variance value.

fsharp
member Var(?ddof: byte) : LazyFrame

Parameters

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

WithColumns ​

Add or replace a single column in the LazyFrame.

Add or replace multiple columns in the LazyFrame.

Add or replace columns using generic column expressions (Expr or Selectors).

fsharp
member WithColumns(expr: Expr) : LazyFrame
member WithColumns(exprs: seq<Expr>) : LazyFrame
member WithColumns(columns: seq<'a>) : LazyFrame

Parameters

NameTypeDescription
exprExprThe expression defining the new column.
exprsseq<Expr>List of expressions defining the new columns.
columnsseq<'a>-

WithRowIndex ​

Add a column at index 0 that counts the rows.

This can be useful to generate a unique index or to maintain order in operations that would otherwise discard it.

fsharp
member WithRowIndex(?name: string, ?offset: int) : LazyFrame

Parameters

NameTypeDescription
namestring (optional)The name of the new row index column. Defaults to "index".
offsetint (optional)The starting value of the row index. Defaults to 0.

Returns: A new LazyFrame with the row index column added.


Pipeline Module Functions (LazyFrame.*) ​

LazyFrame.agg ​

Aggregate LazyGroupBy.

fsharp
LazyFrame.agg : aggs: seq<Expr> -> builder: LazyGroupBy -> LazyFrame

Parameters

NameTypeDescription
aggsseq<Expr>-
builderLazyGroupBy-

LazyFrame.collect ​

Collect the LazyFrame using the default engine.

fsharp
LazyFrame.collect : lazyFrame: LazyFrame -> DataFrame

Parameters

NameTypeDescription
lazyFrameLazyFrame-

LazyFrame.collectAsync ​

Asynchronously execute the LazyFrame query plan. Useful for keeping UI responsive during heavy calculations.

fsharp
LazyFrame.collectAsync : lf: LazyFrame -> FSharpAsync<DataFrame>

Parameters

NameTypeDescription
lfLazyFrame-

LazyFrame.collectBatchesAsync ​

Streams materialized DataFrame batches asynchronously.

fsharp
LazyFrame.collectBatchesAsync : chunkSize: int64 -> lf: LazyFrame -> IAsyncEnumerable<DataFrame>

Parameters

NameTypeDescription
chunkSizeint64-
lfLazyFrame-

LazyFrame.collectSchema ​

Get the schema of the LazyFrame.

fsharp
LazyFrame.collectSchema : lf: LazyFrame -> PolarsSchema

Parameters

NameTypeDescription
lfLazyFrame-

LazyFrame.collectWithEngine ​

Collect the LazyFrame using the specified engine.

fsharp
LazyFrame.collectWithEngine : engine: Engine -> lazyFrame: LazyFrame -> DataFrame

Parameters

NameTypeDescription
engineEngine-
lazyFrameLazyFrame-

LazyFrame.concatDiagonal ​

Concatenate multiple LazyFrames diagonally.

fsharp
LazyFrame.concatDiagonal : lfs: seq<LazyFrame> -> LazyFrame

Parameters

NameTypeDescription
lfsseq<LazyFrame>-

LazyFrame.concatHorizontal ​

Concatenate multiple LazyFrames horizontally.

fsharp
LazyFrame.concatHorizontal : lfs: seq<LazyFrame> -> LazyFrame

Parameters

NameTypeDescription
lfsseq<LazyFrame>-

LazyFrame.concatVertical ​

Concatenate multiple LazyFrames vertically.

fsharp
LazyFrame.concatVertical : lfs: seq<LazyFrame> -> LazyFrame

Parameters

NameTypeDescription
lfsseq<LazyFrame>-

LazyFrame.drop ​

Drop columns from the LazyFrame.

fsharp
LazyFrame.drop : columns: 'a -> lf: LazyFrame -> LazyFrame

Parameters

NameTypeDescription
columns'a-
lfLazyFrame-

LazyFrame.dropNans ​

Drop NaN values from the LazyFrame.

fsharp
LazyFrame.dropNans : lf: LazyFrame -> LazyFrame

Parameters

NameTypeDescription
lfLazyFrame-

LazyFrame.dropNansOn ​

Drop NaN values from the LazyFrame with specific subset.

fsharp
LazyFrame.dropNansOn : subset: 'a -> lf: LazyFrame -> LazyFrame

Parameters

NameTypeDescription
subset'a-
lfLazyFrame-

LazyFrame.dropNulls ​

Drop null values from the LazyFrame.

fsharp
LazyFrame.dropNulls : lf: LazyFrame -> LazyFrame

Parameters

NameTypeDescription
lfLazyFrame-

LazyFrame.dropNullsOn ​

Drop null values from the LazyFrame with specific subset.

fsharp
LazyFrame.dropNullsOn : subset: Expr -> lf: LazyFrame -> LazyFrame

Parameters

NameTypeDescription
subsetExpr-
lfLazyFrame-

LazyFrame.explain ​

Explain the execution plan of the LazyFrame.

fsharp
LazyFrame.explain : lazyFrame: LazyFrame -> string

Parameters

NameTypeDescription
lazyFrameLazyFrame-

LazyFrame.explainUnoptimized ​

Explain the unoptimized LazyFrame execution plan.

fsharp
LazyFrame.explainUnoptimized : lf: LazyFrame -> string

Parameters

NameTypeDescription
lfLazyFrame-

LazyFrame.fillNan ​

Fill NaN values in all columns with a specified value.

fsharp
LazyFrame.fillNan : fillValue: Expr -> lf: LazyFrame -> LazyFrame

Parameters

NameTypeDescription
fillValueExpr-
lfLazyFrame-

LazyFrame.fillNull ​

Fill null values in all columns with a specified value.

fsharp
LazyFrame.fillNull : fillValue: Expr -> lf: LazyFrame -> LazyFrame

Parameters

NameTypeDescription
fillValueExpr-
lfLazyFrame-

LazyFrame.filter ​

Filter rows based on a boolean expression.

fsharp
LazyFrame.filter : expr: Expr -> lf: LazyFrame -> LazyFrame

Parameters

NameTypeDescription
exprExpr-
lfLazyFrame-

LazyFrame.filterAll ​

Filter frame rows by combining multiple predicates with logical AND.

fsharp
LazyFrame.filterAll : predicates: seq<Expr> -> lf: LazyFrame -> LazyFrame

Parameters

NameTypeDescription
predicatesseq<Expr>-
lfLazyFrame-

LazyFrame.groupBy ​

Group by keys.

fsharp
LazyFrame.groupBy : keys: seq<Expr> -> lf: LazyFrame -> LazyGroupBy

Parameters

NameTypeDescription
keysseq<Expr>-
lfLazyFrame-

LazyFrame.having ​

Having clause for LazyGroupBy.

fsharp
LazyFrame.having : predicate: Expr -> builder: LazyGroupBy -> LazyGroupBy

Parameters

NameTypeDescription
predicateExpr-
builderLazyGroupBy-

LazyFrame.head ​

Get the head of the LazyFrame.

fsharp
LazyFrame.head : n: int -> lazyFrame: LazyFrame -> LazyFrame

Parameters

NameTypeDescription
nint-
lazyFrameLazyFrame-

LazyFrame.join ​

Perform a join between two LazyFrames using join keys.

fsharp
LazyFrame.join : other: LazyFrame -> leftOn: seq<Expr> -> rightOn: seq<Expr> -> how: JoinType -> lf: LazyFrame -> LazyFrame

Parameters

NameTypeDescription
otherLazyFrame-
leftOnseq<Expr>-
rightOnseq<Expr>-
howJoinType-
lfLazyFrame-

LazyFrame.joinOn ​

Perform a join between two LazyFrames.

fsharp
LazyFrame.joinOn : other: LazyFrame -> on: seq<Expr> -> how: JoinType -> lf: LazyFrame -> LazyFrame

Parameters

NameTypeDescription
otherLazyFrame-
onseq<Expr>-
howJoinType-
lfLazyFrame-

LazyFrame.melt ​

Alias for LazyFrame.unpivot.

fsharp
LazyFrame.melt : index: Selector -> on: Selector -> lf: LazyFrame -> LazyFrame

Parameters

NameTypeDescription
indexSelector-
onSelector-
lfLazyFrame-

LazyFrame.meltNamed ​

Alias for LazyFrame.unpivotNamed.

fsharp
LazyFrame.meltNamed : index: Selector -> on: Selector -> variableName: string -> valueName: string -> lf: LazyFrame -> LazyFrame

Parameters

NameTypeDescription
indexSelector-
onSelector-
variableNamestring-
valueNamestring-
lfLazyFrame-

LazyFrame.ofEager ​

Create a LazyFrame from DataFrame

fsharp
LazyFrame.ofEager : df: DataFrame -> LazyFrame

Parameters

NameTypeDescription
dfDataFrame-

LazyFrame.orderByAscending ​

Alias for sortAscending.

fsharp
LazyFrame.orderByAscending : expr: seq<Expr> -> lf: LazyFrame -> LazyFrame

Parameters

NameTypeDescription
exprseq<Expr>-
lfLazyFrame-

LazyFrame.orderByDescending ​

Alias for sortDescending.

fsharp
LazyFrame.orderByDescending : expr: seq<Expr> -> lf: LazyFrame -> LazyFrame

Parameters

NameTypeDescription
exprseq<Expr>-
lfLazyFrame-

LazyFrame.rename ​

Rename columns based on a mapping dictionary or key-value pairs.

fsharp
LazyFrame.rename : mapping: seq<(string * string)> -> lf: LazyFrame -> LazyFrame

Parameters

NameTypeDescription
mappingseq<(string * string)>-
lfLazyFrame-

LazyFrame.reverse ​

Reverse the order of the LazyFrame.

fsharp
LazyFrame.reverse : lf: LazyFrame -> LazyFrame

Parameters

NameTypeDescription
lfLazyFrame-

LazyFrame.select ​

Select columns from LazyFrame.

fsharp
LazyFrame.select : exprs: seq<'a> -> lf: LazyFrame -> LazyFrame

Parameters

NameTypeDescription
exprsseq<'a>-
lfLazyFrame-

LazyFrame.slice ​

Slice rows starting at offset with length.

fsharp
LazyFrame.slice : offset: int64 -> length: uint32 -> lf: LazyFrame -> LazyFrame

Parameters

NameTypeDescription
offsetint64-
lengthuint32-
lfLazyFrame-

LazyFrame.sortAscending ​

Sort (Order By) the LazyFrame.

fsharp
LazyFrame.sortAscending : exprs: seq<Expr> -> lf: LazyFrame -> LazyFrame

Parameters

NameTypeDescription
exprsseq<Expr>-
lfLazyFrame-

LazyFrame.sortDescending ​

Sort (Order By) the LazyFrame in descending order.

fsharp
LazyFrame.sortDescending : exprs: seq<Expr> -> lf: LazyFrame -> LazyFrame

Parameters

NameTypeDescription
exprsseq<Expr>-
lfLazyFrame-

LazyFrame.tail ​

Get the tail of the LazyFrame.

fsharp
LazyFrame.tail : n: uint32 -> lazyFrame: LazyFrame -> LazyFrame

Parameters

NameTypeDescription
nuint32-
lazyFrameLazyFrame-

LazyFrame.toAsyncEnumerable ​

Streams strongly typed F# Records/Tuples/DTOs asynchronously from a LazyFrame.

fsharp
LazyFrame.toAsyncEnumerable : chunkSize: int64 -> lf: LazyFrame -> IAsyncEnumerable<'T>

Parameters

NameTypeDescription
chunkSizeint64-
lfLazyFrame-

LazyFrame.toRowsAsync ​

Streams strongly typed F# Records/Tuples/DTOs asynchronously from a LazyFrame.

fsharp
LazyFrame.toRowsAsync : chunkSize: int64 -> lf: LazyFrame -> IAsyncEnumerable<'T>

Parameters

NameTypeDescription
chunkSizeint64-
lfLazyFrame-

LazyFrame.unnest ​

Decompose multiple struct columns.

fsharp
LazyFrame.unnest : columns: 'a -> lf: LazyFrame -> LazyFrame

Parameters

NameTypeDescription
columns'a-
lfLazyFrame-

LazyFrame.unpivot ​

Unpivot (Melt) the LazyFrame from wide to long format using Selectors. Default column names ("variable", "value") will be used.

fsharp
LazyFrame.unpivot : index: Selector -> on: Selector -> lf: LazyFrame -> LazyFrame

Parameters

NameTypeDescription
indexSelector-
onSelector-
lfLazyFrame-

LazyFrame.unpivotNamed ​

Unpivot (Melt) the LazyFrame using Selectors with custom variable and value column names.

fsharp
LazyFrame.unpivotNamed : index: Selector -> on: Selector -> variableName: string -> valueName: string -> lf: LazyFrame -> LazyFrame

Parameters

NameTypeDescription
indexSelector-
onSelector-
variableNamestring-
valueNamestring-
lfLazyFrame-

LazyFrame.withColumn ​

Add or replace columns in the LazyFrame.

fsharp
LazyFrame.withColumn : expr: Expr -> lf: LazyFrame -> LazyFrame

Parameters

NameTypeDescription
exprExpr-
lfLazyFrame-

LazyFrame.withColumns ​

Add or replace multiple columns in the LazyFrame.

fsharp
LazyFrame.withColumns : exprs: seq<Expr> -> lf: LazyFrame -> LazyFrame

Parameters

NameTypeDescription
exprsseq<Expr>-
lfLazyFrame-

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