Count the occurrences of unique values
Description
Count the occurrences of unique values
Usage
<Series>$value_counts(..., sort = TRUE, parallel = FALSE, name = "count")
Arguments
…
|
Ignored. |
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. |
name
|
Give the resulting count field a specific name, defaults to
“count” .
|
Value
DataFrame
Examples
#> shape: (3, 2)
#> ┌────────────────┬───────┐
#> │ flower species ┆ count │
#> │ --- ┆ --- │
#> │ cat ┆ u32 │
#> ╞════════════════╪═══════╡
#> │ setosa ┆ 50 │
#> │ versicolor ┆ 50 │
#> │ virginica ┆ 50 │
#> └────────────────┴───────┘