I am new to data analysis and would like to know if I can display the following categories as columns with percentage values. I am using Python pandas for the analysis.
I have the following data set:
| Country | Geographical extent |
|---|---|
| Austria | Local |
| Austria | Regional |
| Austria | Regional |
| Austria | National |
| Belgium | Local |
| Belgium | Local |
| Belgium | Regional |
| Belgium | Regional |
I would like to get the following result:
| Country | Local | National | Regional |
|---|---|---|---|
| Austria | 25 | 25 | 50 |
| Belgium | 50 | 0 | 50 |
Since there are a lot of countries in the data set, I would like to know if there is an easy way to implement this.