Functions#
These functions are available from the polars module root and can be used as expressions, and sometimes also in eager contexts.
Available in module namespace:
|
Either return an expression representing all columns, or evaluate a bitwise AND operation. |
|
Compute the bitwise AND horizontally across columns. |
|
Evaluate a bitwise OR operation. |
|
Compute the bitwise OR horizontally across columns. |
|
Apply a custom/user-defined function (UDF) in a GroupBy context. |
|
Approximate count of unique values. |
|
Generate a range of integers. |
|
Compute two argument arctan in radians. |
|
Compute two argument arctan in degrees. |
|
Return the row indices that would sort the columns. |
Return indices where |
|
|
Alias for mean. |
|
Folds the columns from left to right, keeping the first non-null value. |
|
Horizontally concatenate columns into a single list column. |
|
Horizontally concatenate columns into a single string column. |
|
Compute the Pearson's or Spearman rank correlation correlation between two columns. |
|
Count the number of values in this column/context. |
|
Compute the covariance between two columns/ expressions. |
|
Cumulatively fold horizontally across columns with a left fold. |
|
Cumulatively reduce horizontally across columns with a left fold. |
|
Cumulatively sum all values. |
|
Cumulatively sum all values horizontally across columns. |
|
Cumulatively accumulate over multiple columns horizontally/ row wise with a left fold. |
|
Cumulatively accumulate over multiple columns horizontally/ row wise with a left fold. |
|
Cumulatively sum all values. |
|
Cumulatively sum all values horizontally across columns. |
|
Create a Polars literal expression of type Date. |
|
Create a Polars literal expression of type Datetime. |
Generate a date range. |
|
Create a column of date ranges. |
|
Generate a datetime range. |
|
Create a column of datetime ranges. |
|
|
Create polars |
|
Alias for an element being evaluated in an |
|
Represent all columns except for the given columns. |
|
Get the first value. |
|
Accumulate over multiple columns horizontally/ row wise with a left fold. |
|
Format expressions as a string. |
Utility function that parses an epoch timestamp (or Unix time) to Polars Date(time). |
|
|
Syntactic sugar for |
|
Get the first |
|
Aggregate all column values into a list. |
Generate a range of integers. |
|
Generate a range of integers for each row of the input columns. |
|
|
Get the last value. |
|
Return an expression representing a literal value. |
|
Map a custom function over multiple columns/expressions. |
|
Map a custom function over multiple columns/expressions. |
|
Apply a custom/user-defined function (UDF) in a GroupBy context. |
|
Get the maximum value. |
|
Get the maximum value horizontally across columns. |
|
Get the mean value. |
|
Get the median value. |
|
Get the minimum value. |
|
Get the minimum value horizontally across columns. |
|
Count unique values. |
|
Construct a column of length |
|
Syntactic sugar for |
|
Accumulate over multiple columns horizontally/ row wise with a left fold. |
|
Construct a column of length |
|
Compute the rolling correlation between two columns/ expressions. |
|
Compute the rolling covariance between two columns/ expressions. |
|
Run polars expressions without a context. |
|
Get the standard deviation. |
|
Collect columns into a struct column. |
|
Sum all values. |
|
Sum all values horizontally across columns. |
|
Parse one or more SQL expressions to polars expression(s). |
|
Get the last |
|
Create a Polars literal expression of type Time. |
Generate a time range. |
|
Create a column of time ranges. |
|
|
Get the variance. |
|
Start a |
|
Construct a column of length |
Available in expression namespace:
|
Return whether all values in the column are |
|
Return whether any of the values in the column are |
|
Apply a custom/user-defined function (UDF) in a GroupBy or Projection context. |
Approximate count of unique values. |
|
Return the number of elements in the column. |
|
|
Get an array with the cumulative sum computed at every element. |
|
Exclude columns from a multi-column expression. |
Get the first value. |
|
|
Get the first |
Aggregate values into a list. |
|
|
Apply a custom python function to a Series or sequence of Series. |
|
Apply a custom python function to a whole Series or sequence of Series. |
|
Map a custom/user-defined function (UDF) to each element of a column. |
|
Get maximum value. |
Get mean value. |
|
Get median value using linear interpolation. |
|
|
Get minimum value. |
Count unique values. |
|
|
Get quantile value. |
|
Get standard deviation. |
|
Get sum value. |
|
Get the last |
|
Get variance. |