I have a dataset like the first table that has a gender value for each row.
I want an output table like the second screen shot that gender is not a column. And all the data for the rest of the columns are separated between "Female" and "male" with two main column with an aggregated total column. how can I get this in pandas?