tidypolars icon indicating copy to clipboard operation
tidypolars copied to clipboard

Remove Tibble subclass and create `tp` or `r` namespace

Open markfairbanks opened this issue 9 months ago • 6 comments

We can use the extension API to create a custom namespace for tidypolars methods that work directly on polars DataFrames and Expressions.

Open to suggestions on whether to use tp or r as the namespace.

import polars as pl
from polars import col
import tidypolars as tp

df = pl.DataFrame({"x": range(3), "y": ["a", "a", "b"]})

(
    df
    .tp.arrange("x")
    .tp.summarize(x_mean = col("x").tp.mean(),
                  _by = "y")
)

markfairbanks avatar May 06 '24 19:05 markfairbanks