Take every n
-th value in the Series and return as a new Series
Description
Take every n
-th value in the Series and return as a new
Series
Usage
<Expr>$gather_every(n, offset = 0)
Arguments
n
|
Gather every n-th row. |
offset
|
Starting index. |
Value
A polars expression
Examples
#> shape: (3, 1)
#> ┌─────┐
#> │ foo │
#> │ --- │
#> │ i32 │
#> ╞═════╡
#> │ 1 │
#> │ 4 │
#> │ 7 │
#> └─────┘
#> shape: (3, 1)
#> ┌─────┐
#> │ foo │
#> │ --- │
#> │ i32 │
#> ╞═════╡
#> │ 2 │
#> │ 5 │
#> │ 8 │
#> └─────┘