Count rows by group
Counts rows in a DataFrame, optionally by selected columns or existing group keys.
df (DataFrame): The input data
frame.
⦠(Column): Columns to group by
(bare names or $col references).
name (String): = ānā Name for the
count column.
A DataFrame with one row per group and a count column.
count(df)
count(df, $species)
count(df, $species, $year, name = "freq")