Hellow I have DataFrame like below:
df= pd.DataFrame({"target1" : [10, 0, 15, 10], "target2" : [50, 0, 20, 0], "ID" : ["1", "2", "3", "4"]})
And I need to create plot (bar or pie) which will show how % of ID have target1, how many target2, how many other (neither target1 nor target2).
I need results something like below:
T1 75% because 3 from 4 IDs have target1
T2 50% because 2 from 4 IDs have target2
other 25% because 1 from 4 do not have neither target1 nor target2
And I need have percentage description of columns and legend some if possible