title: Group Bar Chart with Seaborn/Matplotlib
body: <p>My goal is to create a grouped bar chart like the one below, using a pandas DataFrame that is grouped by two variables "Alpha" and "Beta."
  <a href="https://i.stack.imgur.com/pfs5p.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pfs5p.png" alt="Group Bar Chart"></a></p>
  
  <pre><code>xl2 = xl.groupby(['Alpha','Beta']).median()
  </code></pre>
  
  <p>When I tried this, a KeyError was thrown on 'Alpha'</p>
  
  <pre><code>import seaborn as sns
  sns.barplot(x=['Alpha', 'Beta'], y=xl2['Gamma'])
  </code></pre>
  
  <p>My hope was to pass in a list of x values to index on ('Alpha' and 'Beta'), and graph the associated 'Gamma." The documentation for the <a href="https://stanford.edu/~mwaskom/software/seaborn/generated/seaborn.barplot.html" rel="nofollow noreferrer">seaborn.barplot function</a> doesn't provide any group bar chart examples.</p>
  
  <p>Thanks for your help!</p>