Polars top-level function namespace
Description
pl
is an environment class object that stores all the
top-level functions of the R Polars API which mimics the Python Polars
API. It is intended to work the same way in Python as if you had
imported Python Polars with import
polars as pl
.
Usage
pl
Format
An object of class polars_object
of length 85.
Examples
#> <polars_object>
#> [1] 85
# Create a polars DataFrame
# In Python:
# ```python
# >>> import polars as pl
# >>> df = pl.DataFrame({"a": [1, 2, 3], "b": [4, 5, 6]})
# ```
# In R:
df <- pl$DataFrame(a = c(1, 2, 3), b = c(4, 5, 6))
df
#> shape: (3, 2)
#> ┌─────┬─────┐
#> │ a ┆ b │
#> │ --- ┆ --- │
#> │ f64 ┆ f64 │
#> ╞═════╪═════╡
#> │ 1.0 ┆ 4.0 │
#> │ 2.0 ┆ 5.0 │
#> │ 3.0 ┆ 6.0 │
#> └─────┴─────┘