Skip to content

Select from an empty DataFrame

Source code

Description

pl$select(…) is a shorthand for pl$DataFrame(list())$select(…)

Usage

pl$select(...)

Arguments

Expressions

Value

a DataFrame

Examples

library("polars")

pl$select(
  pl$lit(1:4)$alias("ints"),
  pl$lit(letters[1:4])$alias("letters")
)
#> shape: (4, 2)
#> ┌──────┬─────────┐
#> │ ints ┆ letters │
#> │ ---  ┆ ---     │
#> │ i32  ┆ str     │
#> ╞══════╪═════════╡
#> │ 1    ┆ a       │
#> │ 2    ┆ b       │
#> │ 3    ┆ c       │
#> │ 4    ┆ d       │
#> └──────┴─────────┘