polars::prelude

Function repeat

pub fn repeat<E>(value: E, n: Expr) -> Expr
where E: Into<Expr>,
Available on crate feature lazy only.
Expand description

Create a column of length n containing n copies of the literal value.

Generally you won’t need this function, as lit(value) already represents a column containing only value whose length is automatically set to the correct number of rows.