Skip to content

Reverse the DataFrame

Description

Reverse the DataFrame

Usage

<DataFrame>$reverse()

Value

A polars DataFrame

Examples

library("polars")

df <- pl$DataFrame(key = c("a", "b", "c"), val = 1:3)

df$reverse()
#> shape: (3, 2)
#> ┌─────┬─────┐
#> │ key ┆ val │
#> │ --- ┆ --- │
#> │ str ┆ i32 │
#> ╞═════╪═════╡
#> │ c   ┆ 3   │
#> │ b   ┆ 2   │
#> │ a   ┆ 1   │
#> └─────┴─────┘