polars.arange

polars.arange(low: Union[int, polars.internals.expr.Expr, polars.internals.series.Series], high: Union[int, polars.internals.expr.Expr, polars.internals.series.Series], step: int = 1, *, eager: Literal[False]) polars.internals.expr.Expr
polars.arange(low: Union[int, polars.internals.expr.Expr, polars.internals.series.Series], high: Union[int, polars.internals.expr.Expr, polars.internals.series.Series], step: int = 1, *, eager: Literal[True]) polars.internals.series.Series
polars.arange(low: Union[int, polars.internals.expr.Expr, polars.internals.series.Series], high: Union[int, polars.internals.expr.Expr, polars.internals.series.Series], step: int = 1, *, eager: bool = 'False') Union[polars.internals.expr.Expr, polars.internals.series.Series]

Create a range expression. This can be used in a select, with_column etc. Be sure that the range size is equal to the DataFrame you are collecting.

Parameters
low

Lower bound of range.

high

Upper bound of range.

step

Step size of the range

eager

If eager evaluation is True, a Series is returned instead of an Expr

Examples

>>> df.lazy().filter(pl.col("foo") < pl.arange(0, 100)).collect()