title: Plot number of occurrences in Pandas dataframe (2)
body: <p>this is a followup from the previous question: <a href="https://stackoverflow.com/questions/21331722/plot-number-of-occurrences-from-pandas-dataframe">Plot number of occurrences from Pandas DataFrame</a></p>
  
  <p>I'm trying to produce a bar chart in descending order from the results of a pandas dataframe that is grouped by "Issuing Office." The data comes from a csv file which has 3 columns: System (string), Issuing Office (string), Error Type (string).  The first four commands work fine - read, fix the column headers, strip out the offices I don't need, and reset the index.  However I've never displayed a chart before.</p>
  
  <p>CSV looks like:</p>
  
  <pre><code>System Issuing Office Error Type
  East   N1             Error1
  East   N1             Error1
  East   N2             Error1
  West   N1             Error3
  </code></pre>
  
  <p>Looking for a simple horizontal bar chart that would show N1 had a count of 3, N2 had a count of 2.</p>
  
  <pre><code>import matplotlib.pyplot as plt
  import pandas as pd
  
  df = pd.read_csv('mydatafile.csv',index_col=None, header=0)    #ok
  df.columns = [c.replace(' ','_') for c in df.columns]          #ok
  df = df[df['Issuing_Office'].str.contains("^(?:N|M|V|R)")]     #ok
  df = df.reset_index(drop=True)                                 #ok
  
  # produce chart that shows how many times an office came up (Decending)
  df.groupby([df.index, 'Issuing_Office']).count().plot(kind='bar')
  plt.show()
  
  # produce chart that shows how many error types per Issuing Office (Descending).
  </code></pre>
  
  <p>There are no date fields in this which makes it different than the original question.  Any help is greatly appreciated :)</p>