Module polars_plan::dsl::functions
source · Expand description
§Functions
Functions on expressions that might be useful.
Structs§
- Arguments used by
datetime
in order to produce anExpr
of Datetime
Functions§
- Selects all columns. Shorthand for
col("*")
. - Create a new column with the bitwise-and of the elements in each row.
- Create a new column with the bitwise-or of the elements in each row.
- Like
map_binary
, but used in a group_by-aggregation context. - arange
range
Generate a range of integers. - arg_sort_by(
range
orarg_where
) andrange
Find the indexes that would sort these series in order of appearance. That means that the firstSeries
will be used to determine the ordering until duplicates are found. Once duplicates are found, the nextSeries
will be used and so on. - arg_where(
range
orarg_where
) andarg_where
Get the indices wherecondition
evaluatestrue
. - as_struct
dtype-struct
Take several expressions and collect them into aStructChunked
. - Find the mean of all the values in the column named
name
. Alias formean
. - Casts the column given by
Expr
to a different type. - Folds the expressions from left to right keeping the first non-null values.
- Create a Column Expression based on a column name.
- Select multiple columns by name.
- Concat lists entries.
- concat_str
concat_str
andstrings
Horizontally concat string columns in linear time - cov
cov
Compute the covariance between two columns. - cum_fold_exprs
dtype-struct
Accumulate over multiple columns horizontally / row wise. - cum_reduce_exprs
dtype-struct
Accumulate over multiple columns horizontally / row wise. - date_range
range
andtemporal
Create a date range from astart
andstop
expression. - date_ranges
range
andtemporal
Create a column of date ranges from astart
andstop
expression. - datetime
temporal
Construct a column ofDatetime
from the providedDatetimeArgs
. - datetime_range
range
anddtype-datetime
Create a datetime range from astart
andstop
expression. - datetime_ranges
range
anddtype-datetime
Create a column of datetime ranges from astart
andstop
expression. - Select multiple columns by dtype.
- Select multiple columns by dtype.
- duration
temporal
Construct a column ofDuration
from the providedDurationArgs
- Accumulate over multiple columns horizontally / row wise.
- format_str
concat_str
andstrings
Format the results of an array of expressions using a format string - int_range
range
Generate a range of integers. - int_ranges
range
Generate a range of integers for each row of the input columns. - A column which is
false
whereverexpr
is null,true
elsewhere. - A column which is
true
whereverexpr
is null,false
elsewhere. - Find the maximum of all the values in the column named
name
. Shorthand forcol(name).max()
. - Create a new column with the maximum value per row.
- Find the mean of all the values in the column named
name
. Shorthand forcol(name).mean()
. - Compute the mean of all values horizontally across columns.
- Find the median of all the values in the column named
name
. Shorthand forcol(name).median()
. - Find the minimum of all the values in the column named
name
. Shorthand forcol(name).min()
. - Create a new column with the minimum value per row.
- Negates a boolean column.
- pearson_corr
cov
Compute the pearson correlation between two columns. - Find a specific quantile of all the values in the column named
name
. - Analogous to
Iterator::reduce
. - Create a column of length
n
containingn
copies of the literalvalue
. Generally you won’t need this function, aslit(value)
already represents a column containing onlyvalue
whose length is automatically set to the correct number of rows. - rolling_corr
cov
androlling_window
- rolling_cov
cov
androlling_window
- spearman_rank_corr
rank
andpropagate_nans
andcov
Compute the spearman rank correlation between two columns. Missing data will be excluded from the computation. - Sum all the values in the column named
name
. Shorthand forcol(name).sum()
. - Sum all values horizontally across columns.
- time_range
range
anddtype-time
Generate a time range. - time_ranges
range
anddtype-time
Create a column of time ranges from astart
andstop
expression.