Skip to content

Get the first row of the LazyFrame

Description

Get the first row of the LazyFrame

Usage

<LazyFrame>$first()

Value

A polars LazyFrame

Examples

library("polars")

lf <- pl$LazyFrame(a = 1:4, b = c(1, 2, 1, 1))
lf$first()$collect()
#> shape: (1, 2)
#> ┌─────┬─────┐
#> │ a   ┆ b   │
#> │ --- ┆ --- │
#> │ i32 ┆ f64 │
#> ╞═════╪═════╡
#> │ 1   ┆ 1.0 │
#> └─────┴─────┘