I have a dataframe that looks like this:
COLA COLB COLC COLD COLE
Name1 yes A AB uno
Name2 yes B AC dos
Name3 no C AB tres
Name4 no D AC cuatro
How do I create a proportion dataframe that shows the percentages of each selected column value along with the frequency:
ATTRIBUTE Percentages Frequency
*COLB* *Percentage* *Amount*
yes 50% 2
no 50% 2
*COLC* *Percentage *Amount*
A 25% 1
B 25% 1
C 25% 1
D 25% 1
*COLD* *Percentage* *Amount*
AB 50% 2
AC 50% 2
It doesn't need to look exactly like this but I need it to all be in one dataframe and include only the selected columns mentioned.
Any help would be great, thanks!