Polars class final

An explicit native Polars runtime. Every resource created through this object belongs exclusively to this runtime, even when two runtimes were constructed from the same ProtocolClient.

Available extensions

Constructors

Polars.fromClient(ProtocolClient _client)
Wraps an existing ProtocolClient as a new, independent runtime.
Polars.native()
Uses the native library supplied by this package's native-assets hook.
factory
Polars.open(String path)
Loads the native library at path with DynamicLibrary.open.
factory
Polars.process()
Uses native symbols already linked into the current process.
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
selectors → SelectorFactory
Creates selectors owned by this runtime.
no setter

Methods

allocateArrowCData() → ArrowCData
Allocates empty owned C Data structs for an external Arrow producer.
allocateArrowCStream() → ArrowCStream
Allocates an empty owned C Stream struct for an external producer.
col(String name) → Expr
Creates an expression that references the column called name.
concat(Iterable<LazyFrame> frames, {String how = 'vertical', bool rechunk = false}) → LazyFrame
Concatenates lazy frames owned by this runtime into one plan.
fromArrowArray(String name, ArrowArray array, [RecordBatchCodec codec = const RecordBatchCodec()]) → Future<Series>
Imports an owned Arrow array as a Series called name.
fromArrowArraySync(String name, ArrowArray array, [RecordBatchCodec codec = const RecordBatchCodec()]) → Series
Synchronously imports an owned Arrow array as a Series called name.
fromArrowCData(ArrowCData data) → DataFrame
Imports Arrow C Data Interface structs as a DataFrame.
fromArrowCStream(ArrowCStream stream, {required int maxBatches, required int maxRows}) → DataFrame
Imports an Arrow C Stream Interface stream as a DataFrame.
fromRecordBatch(RecordBatch batch, [RecordBatchCodec codec = const RecordBatchCodec()]) → Future<DataFrame>
Imports an owned Arrow batch as an eager DataFrame.
fromRecordBatchSync(RecordBatch batch, [RecordBatchCodec codec = const RecordBatchCodec()]) → DataFrame
Synchronously imports an owned Arrow batch as an eager DataFrame.
len() → Expr
Creates an expression that evaluates to the number of rows.
lit(Object? value, [DType? dtype]) → Expr
Creates a literal expression from a Dart value.
nativeCapabilities() → Future<NativeHelloCapabilities>
Reports the protocol and feature capabilities of the loaded native library.
nativeCapabilitiesSync() → NativeHelloCapabilities
Synchronously reports the protocol and feature capabilities of the loaded native library.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readCsv(String path, {bool hasHeader = true, String separator = ',', int? skipRows, int? nRows, bool tryParseDates = false, ExecutionOptions options = const ExecutionOptions()}) → Future<DataFrame>
Reads a CSV file eagerly by collecting a lazy CSV scan.
readCsvSync(String path, {bool hasHeader = true, String separator = ',', int? skipRows, int? nRows, bool tryParseDates = false, ExecutionOptions options = const ExecutionOptions()}) → DataFrame
Reads a CSV file eagerly by collecting a lazy CSV scan.
readIpcStream(String path, {IpcStreamReadOptions options = const IpcStreamReadOptions()}) → Future<DataFrame>

Available on Polars, provided by the LocalIoPolars extension

readIpcStreamSync(String path, {IpcStreamReadOptions options = const IpcStreamReadOptions()}) → DataFrame

Available on Polars, provided by the LocalIoPolars extension

readJson(String path, {JsonReadOptions options = const JsonReadOptions()}) → Future<DataFrame>

Available on Polars, provided by the LocalIoPolars extension

readJsonSync(String path, {JsonReadOptions options = const JsonReadOptions()}) → DataFrame

Available on Polars, provided by the LocalIoPolars extension

runtimeDiagnostics() → Future<RuntimeDiagnostics>
Reads diagnostic information from the native runtime.
runtimeDiagnosticsSync() → RuntimeDiagnostics
Synchronously reads diagnostic information from the native runtime.
scanCsv(String path, {bool hasHeader = true, String separator = ',', int? skipRows, int? nRows, bool tryParseDates = false}) → LazyFrame
Lazily scans the CSV file at path.
scanFeather(String path, {IpcScanOptions options = const IpcScanOptions()}) → LazyFrame

Available on Polars, provided by the LocalIoPolars extension

scanIpc(String path, {IpcScanOptions options = const IpcScanOptions()}) → LazyFrame

Available on Polars, provided by the LocalIoPolars extension

scanNdjson(String path, {NdjsonScanOptions options = const NdjsonScanOptions()}) → LazyFrame

Available on Polars, provided by the LocalIoPolars extension

scanParquet(String path, {int? nRows, bool parallel = true}) → LazyFrame
Lazily scans the Parquet file at path.
seriesFromArrowCData(ArrowCData data) → Series
Imports Arrow C Data Interface structs as a Series.
sqlContext() → SqlContext
Creates an empty SQL context owned by this runtime.
toString() → String
A string representation of this object.
inherited
when(Expr predicate) → When
Starts a conditional when(...).then(...).otherwise(...) expression whose first branch applies where predicate is true.

Operators

operator ==(Object other) → bool
The equality operator.
inherited