Value counts
Description
Count all unique values and create a struct mapping value to count.
Usage
<Expr>$value_counts(sort = FALSE, parallel = FALSE)
Arguments
sort
|
Ensure the output is sorted from most values to least. |
parallel
|
Better to turn this off in the aggregation context, as it can lead to contention. |
Value
Expr
Examples
#> shape: (3, 1)
#> ┌───────────────────┐
#> │ Species │
#> │ --- │
#> │ struct[2] │
#> ╞═══════════════════╡
#> │ {"setosa",50} │
#> │ {"virginica",50} │
#> │ {"versicolor",50} │
#> └───────────────────┘
#> Species count
#> 1 setosa 50
#> 2 virginica 50
#> 3 versicolor 50