title: Grouped bar chart from two pandas data frames
body: <p>I have two data frames containing different values but the same structure:</p>
  
  <p>df1 = </p>
  
  <pre><code>         0         1         2         3         4 
  D  0.003073  0.014888  0.155815  0.826224       NaN
  E  0.000568  0.000435  0.000967  0.002956  0.067249  
  </code></pre>
  
  <p>df2 =</p>
  
  <pre><code>     0         1         2         3         4
  D  0.746689  0.185769  0.060107  0.007435       NaN   
  E  0.764552  0.000000  0.070288  0.101148  0.053499
  </code></pre>
  
  <p>I want to plot both data frames in a single grouped bar chart. In addition, each row (index) should be a subplot.</p>
  
  <p>This can be easily achieved for one of them using pandas directly:</p>
  
  <pre><code>df1.T.plot(kind="bar", subplots=True, layout=(2,1), width=0.7, figsize=(10,10), sharey=True)
  </code></pre>
  
  <p>I tried to join them using </p>
  
  <pre><code>pd.concat([df1, df2], axis=1)
  </code></pre>
  
  <p>which results in a new dataframe:</p>
  
  <pre><code>         0         1         2         3         4         0         1         2         3         4
  D  0.003073  0.014888  0.155815  0.826224       NaN  0.746689  0.185769  0.060107  0.007435       NaN
  E  0.000568  0.000435  0.000967  0.002956  0.067249  0.764552  0.000000  0.070288  0.101148  0.053499
  </code></pre>
  
  <p>However, plotting the data frame with the above method will not group the bars per column but rather treats them separately. Per subplot this results in a x-axis with duplicated ticks in order of the columns, e.g. <code>0,1,2,3,4,0,1,2,3,4</code>.</p>
  
  <p>Any ideas?</p>