I have 2 columns in dataset, one is Country other is Gender , Gender has some NaN or N/A values. In pandas it look like so:
import pandas as pd
Country = ['United Kingdom', 'Bosnia and Herzegovina', 'Thailand', 'United States', 'Ukraine', 'Canada', 'Ukraine', 'India', 'New Zealand', 'India', 'Antigua and Barbuda', 'Canada', 'United States', 'Germany', 'India', 'United Kingdom', 'Australia', 'Russian Federation', 'Brazil', 'Lithuania']
Gender = ['Man', 'Man', 'Man', 'Man', 'Man', 'Man', 'Man', 'Man', 'Man', nan, 'Man', 'Woman', 'Man', 'Man', 'Man', 'Man', 'Man', 'Man', 'Man', 'Man']
I want to plot missing values as a proportion of all values of Gender in a Country category. I first use groupby on Country column which gave me only total count of gender within a country, what will be the best way to plot missing values as proportion of total gender value in a country:
EDIT: Answered this question in comments, please view solution, if you think the solution could be better please comment under the solution comment.