i have a dataframe like this:
| country | question1 | question2 |
|---|---|---|
| france | yes | no |
| italy | yes | yes |
| france | yes | no |
| germany | no | yes |
| italy | no | yes |
i would like to get an output like a pivot table or a group with a count of yes/no for each Question and each country(similar countifs of excel).
I tried many methods as df.groupby(country).value_counts() or df.groupby(country).sum("Yes")
but i cannot get the result wanted.
And i would like to make a chart of this result obtained, only for the YES answer.
Someone can give me an advice?
Thanks
