title: Plotting percentage in seaborn bar plot
body: <p>For a dataframe</p>
  
  <pre><code>import pandas as pd
  df=pd.DataFrame({'group':list("AADABCBCCCD"),'Values':[1,0,1,0,1,0,0,1,0,1,0]})
  </code></pre>
  
  <p>I am trying to plot a barplot showing percentage of times <code>A, B, C, D</code> takes zero (or one). </p>
  
  <p>I have a round about way which works but I am thinking there has to be more straight forward way </p>
  
  <pre><code>tempdf=df.groupby(['group','Values']).Values.count().unstack().fillna(0)
  tempdf['total']=df['group'].value_counts()
  tempdf['percent']=tempdf[0]/tempdf['total']*100
  
  tempdf.reset_index(inplace=True)
  print tempdf
  
  sns.barplot(x='group',y='percent',data=tempdf)
  </code></pre>
  
  <p>If it were plotting just the mean value, I could simply do <code>sns.barplot</code> on <code>df</code> dataframe than tempdf. I am not sure how to do it elegantly if I am interested in plotting percentages. </p>
  
  <p>Thanks, </p>