Suppose I have a data like
df = pd.Dataframe({'id': [1,2,3,4,5], 'Disease' : [0,0,1,0,1], 'code':['A', 'B', 'B', 'A', 'A']})
Now I know that if I groupby code
m = df.groupby(df.code).size()
I have the frequency chart of people with code A and B. I need to plot this as a bar graph but I want the percentage graph. That is y axis is percentage from 0 to 100 and x-axis to be code. I want see what percent of people with code A has status 0 and 1, similarly the other way round. As someone dealt with this before ?