title: plot a stacked bar chart matplotlib pandas
body: <p>I want to plot this data frame but I get an error.
  this is my df:</p>
  
  <pre><code>            6month  final-formula   Question Text
  166047.0       1       0.007421         bathing
  166049.0       1       0.006441        dressing
  166214.0       1       0.001960         feeding
  166216.0       2       0.011621         bathing
  166218.0       2       0.003500        dressing
  166220.0       2       0.019672         feeding
  166224.0       3       0.012882         bathing
  166226.0       3       0.013162        dressing
  166229.0       3       0.008821         feeding
  160243.0       4       0.023424         bathing
  156876.0       4       0.000000        dressing
  172110.0       4       0.032024         feeding
  </code></pre>
  
  <p>how can I plot a stacked bar based on the <code>Question text</code>?
  I tried some codes but raises error.</p>
  
  <pre><code>dffinal.groupby(['6month','Question Text']).unstack('Question Text').plot(kind='bar',stacked=True,x='6month', y='final-formula')
  import matplotlib.pyplot as plt
  plt.show()
  </code></pre>
  
  <p>Actually I want the <code>6month</code> column be in the <code>x-axis</code>, <code>final-formula</code> in the <code>y-axis</code> and <code>Question text</code> being stacked.</p>
  
  <p>so as here I have three kind of <code>Question text</code>, three stacked bar should be there. and as I have <code>4 month</code>, 4 bars totally.</p>
  
  <p>Something like <a href="https://stackoverflow.com/questions/26683654/making-a-stacked-barchart-in-pandas">this</a> but I applied this and did not work.
  Am I missing something?</p>
  
  <p>this picture is without stacking them. its like all <code>question text</code> has been summed up. I want for each <code>Question Text</code> there be stacked.</p>
  
  <p><a href="https://i.stack.imgur.com/9234N.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9234N.png" alt="enter image description here"></a></p>