Im not sure if I am wording the question properly but I have been looking for a little and havent found what I needed.
For example, given data like this
| Column A | Column B |
|---|---|
| 1 | yes |
| 2 | no |
| 3 | yes |
| 4 | yes |
is there anything in pandas that would allow me to sum up the entries that are yes and no and make a pivot table like:
Total Values
Yes --> 3
No --> 1
i have some data where the choices of the data are 5 options that are all strings and i would like to find out how pandas can sum them up and put in a pivot table to see how many people voted for each of the choices.
I have been trying to use the groupby() function and messing with the index and columns parameter but I have been getting datatype error codes