I have a DataFrame with a :group
column and did a
gb = groupby(df, :group)
I would like to plot the group sizes vs. group id.
For example, for group gb[1]
on the x-axis I would like to plot nrow(gb[1])
on the y-axis
How can I do it?
I have a DataFrame with a :group
column and did a
gb = groupby(df, :group)
I would like to plot the group sizes vs. group id.
For example, for group gb[1]
on the x-axis I would like to plot nrow(gb[1])
on the y-axis
How can I do it?
gb = combine(groupby(df, :group), nrow => :n)
scatter(gb.group, gb.n)
Requires DataFrames and Plots