title: Pandas - Plotting a stacked Bar Chart
body: <p>I am trying to create a stacked bar graph that replicates the picture, all my data is separate from that excel spreadsheet.</p>
  
  <p><img src="https://i.stack.imgur.com/z6Hzd.jpg" alt="enter image description here"></p>
  
  <p>I cant figure out how to make a dataframe for it like pictured, nor can I figure out how to make the stacked bar chart. All examples I locate work in different ways to what I'm trying to create.</p>
  
  <p>My dataframe is a csv of all values narrowed down to the following with a pandas dataframe.</p>
  
  <pre><code>      Site Name    Abuse/NFF
  0    NORTH ACTON       ABUSE
  1    WASHINGTON         -
  2    WASHINGTON        NFF
  3    BELFAST            -
  4    CROYDON            - 
  </code></pre>
  
  <p>I have managed to count the data with totals and get individual counts for each site, I just cant seem to combine it in a way to graph.</p>
  
  <p>Would really appreciate some strong guidance.</p>
  
  <p>Completed code, many thanks for the assistance completing.</p>
  
  <pre><code>test5 = faultdf.groupby(['Site Name', 'Abuse/NFF'])['Site Name'].count().unstack('Abuse/NFF').fillna(0)
  
  test5.plot(kind='bar', stacked=True)
  </code></pre>