For a dataframe
import pandas as pd
df=pd.DataFrame({\'group\':list(\"AADABCBCCCD\"),\'Values\':[1,0,1,0,1,0,0,1,0,1,0]})
I am trying to pl
You could use your own function in sns.barplot
estimator
, as from docs:
estimator : callable that maps vector -> scalar, optional
Statistical function to estimate within each categorical bin.
For you case you could define function as lambda:
sns.barplot(x='group', y='Values', data=df, estimator=lambda x: sum(x==0)*100.0/len(x))