I have a dataset, and I want to group by one of my columns, and then show the Length of another set of columns for each group. For example:
letter color
a red
a red
a blue
b blue
I want my new dataset to show:
red blue
a 2 1
b 0 1
where red and blue are now column headers.
What code can I use to do this?