Function intRanges

  • Generate a range of integers for each row of the input columns.

    Parameters

    • start: any

      Lower bound of the range (inclusive).

    • end: any

      Upper bound of the range (exclusive).

    • Optional step: number

      Step size of the range.

    • Optional dtype: DataType
    • Optional eager: false

      Evaluate immediately and return a Series. If set to False (default), return an expression instead.

    Returns pl.Expr

    • Column of data type List(dtype).

    Example

    const df = pl.DataFrame({"a": [1, 2], "b": [3, 4]})
    const result = df.select(pl.intRanges("a", "b"));
  • Parameters

    • start: any
    • end: any
    • Optional step: number
    • Optional dtype: DataType
    • Optional eager: true

    Returns pl.Series