Data Validation Libraries for Polars (2025 Edition)
posit-dev.github.io2 pointsby closed0 comments
starwars %>%
select(name, mass) %>%
mutate(
mass2 = mass * 2,
mass2_squared = mass2 * mass2
)
This example's output is a dataframe with 4 columns and will display first 5 rows. (cars
>> mutate(
cyl2 = _.cyl * 2,
cyl4 = _.cyl2 * 2
)
>> head(2)
)
cyl mpg hp cyl2 cyl4
0 6 21.0 110 12 24
1 6 21.0 110 12 24
It's nice you can see the full example in the docstring in python, but also very handy seeing complex examples on R doc pages:
(Both has2k1 and I work for Posit, which supports plotnine work, but authoring its guide was mostly an act of passion for me :)