Module polars::prelude[][src]

Modules

Data types supported by Polars.

Structs

A Vec wrapper with a memory alignment equal to Arrow’s primitive arrays. Can be useful in creating a new ChunkedArray or Arrow Primitive array without copying.

A thread-safe reference-counting pointer. ‘Arc’ stands for ‘Atomically Reference Counted’.

Contains the meta-data for a single relative type.

Describes the meta-data of an ordered sequence of relative types.

ChunkedArray

Create a new DataFrame by reading a csv file.

Write a DataFrame to csv.

Read Arrows IPC format into a DataFrame

Write a DataFrame to Arrow’s IPC format

Lazy abstraction over an eager DataFrame. It really is an abstraction over a logical plan. The methods of this struct will incrementally modify a logical plan until output is requested (via collect)

Utility struct for lazy groupby operation.

Wrapper type that indicates that the inner type is not equal to anything

Just a wrapper structure. Useful for certain impl specializations This is for instance use to implement impl<T> FromIterator<T::Native> for NoNull<ChunkedArray<T>> as Option<T::Native> was already implemented: impl<T> FromIterator<Option<T::Native>> for ChunkedArray<T>

The literal Null

State of the allowed optimizations

Read Apache parquet format into a DataFrame.

Write a DataFrame to parquet format

Wrapper struct that allow us to use a PhysicalExpr in polars-io.

JSON file reader builder

Series

This is object to use if your file is already in memory. The sliceable cursor is similar to std::io::Cursor, except that it makes it easy to create “cursor slices”. To achieve this, it uses Arc instead of shared references. Indeed reference fields are painful because the lack of Generic Associated Type implies that you would require complex lifetime propagation when returning such a cursor.

Intermediate state of when(..).then(..).otherwise(..) expr.

Intermediate state of when(..).then(..).otherwise(..) expr.

Intermediate state of chain when then exprs.

A CSV writer builder

Enums

The set of datatypes that are supported by this implementation of Apache Arrow.

Queries consists of multiple expressions.

YEAR_MONTH or DAY_TIME interval in SQL style.

An absolute length of time in seconds, milliseconds, microseconds or nanoseconds.

Traits

Argmin/ Argmax

Trait bridging the dynamic-typed nature of Arrow (via DataType) with the static-typed nature of rust types ([ArrowNativeType]) for all types that implement [ArrowNativeType].

Aggregation operations

Aggregations that return Series of unit length. Those can be used in broadcasting operations.

Fastest way to do elementwise operations on a ChunkedArray when the operation is cheaper than branching due to null checking

Apply kernels on the arrow array chunks in a ChunkedArray.

Cast ChunkedArray<T> to ChunkedArray<N>

Compare Series and ChunkedArray’s and get a boolean mask that can be used to filter rows.

Create a new ChunkedArray filled with values at that index.

Explode/ flatten a

Replace None values with various strategies

Replace None values with a value

Filter values by a boolean mask.

Fill a ChunkedArray with one value.

Find local minima/ maxima

Reverse a ChunkedArray

Create a ChunkedArray with new values by index or by boolean mask. Note that these operations clone data. This is however the only way we can modify at mask or index level as the underlying Arrow arrays are immutable.

Shift the values of a ChunkedArray by a number of periods.

Sort operations on ChunkedArray.

Fast access by index.

Traverse and collect every nth element

Get unique values in a ChunkedArray

Variance and standard deviation aggregation.

Rolling window functions

Custom rolling window functions

Combine 2 ChunkedArrays based on some predicate.

Executors will evaluate physical expressions and collect them in a DataFrame.

Trait for ChunkedArrays that don’t have null values. The result is the most efficient implementation Iterator, according to the number of chunks.

Create a type that implements a faster TakeRandom.

Check if element is member of list array

Take a DataFrame and evaluate the expressions. Implement this for Column, lt, eq, etc

A type that implements this transforms a LogicalPlan to a physical plan.

A PolarsIterator is an iterator over a ChunkedArray which contains polars types. A PolarsIterator must implement ExactSizeIterator and DoubleEndedIterator.

Any type that is not nested

A wrapper trait for any binary closure Fn(Series, Series) -> Result<Series>

A wrapper trait for any closure Fn(Vec<Series>) -> Result<Series>

Random access

Functions

Evaluate all the expressions with a bitwise and

Evaluate all the expressions with a bitwise or

Find the mean of all the values in this Expression.

Cast expression.

Create a Column Expression based on a column name.

Count the number of values in this Expression.

Exclude a column from selection.

Accumulate over multiple columns horizontally / row wise.

IsNotNull expression.

IsNull expression

Create a Literal Expression from L

Apply a closure on the two columns that are evaluated from Expr a and Expr b.

Binary function where the output type is determined at runtime when the schema is known.

Find the maximum of all the values in this Expression.

Get the the minimum value per row

Find the mean of all the values in this Expression.

Find the median of all the values in this Expression.

Find the minimum of all the values in this Expression.

Get the the minimum value per row

Not expression.

Find a specific quantile of all the values in this Expression.

Create a range literal.

Sum all the values in this Expression.

Get the the sum of the values per row

Start a when-then-otherwise expression

Type Definitions