assuming I have the following dataframe:
distributor channel
1 Warner CH1
2 Warner CH2
3 Warner CH2
4 Warner CH3
5 Columbia CH4
what I want is to get the distribution of channels per distributor, in this simple example:
distributor CH1 CH2 CH3 CH4
1 Warner 25% 50% 25% 0%
2 Columbia 0% 0% 0% 100%
I looked into the density function and other similar functions but couldn't figure it out.
Any help will be appreciated!