Descriptives with the count verb

The count very allows you quick count unique values of one or more variables.

Tidyverse
df %>% add_count(size)
color size value_weight value_height n
blue small 3 12 1
red large 8 45 2
green large 9 42 2
Polars
df.groupby("size").count()
shape: (2, 2)
size count
str u32
"large" 2
"small" 1