title: Barplot per each ax in matplotlib
body: <p>I have the following dataset, ratings in stars for two fictitious places:</p>
  <pre class="lang-py prettyprint-override"><code>import pandas as pd
  import matplotlib.pyplot as plt
  df = pd.DataFrame({'id':['A','A','A','A','A','A','A','B','B','B','B','B','B'], 
                     'rating':[1,2,4,5,5,5,3,1,3,3,3,5,2]})
  </code></pre>
  <p>Since the rating is a category (is not a continuous data) I convert it to a category:</p>
  <pre class="lang-py prettyprint-override"><code>df['rating_cat'] = pd.Categorical(df['rating'])
  </code></pre>
  <p>What I want is to create a bar plot per each fictitious place ('A or B'), and the count per each rating. This is the intended plot:</p>
  <p><a href="https://i.stack.imgur.com/YQmpk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YQmpk.png" alt="enter image description here" /></a></p>
  <p>I guess using a for per each value in id could work, but I have some trouble to decide the size:</p>
  <pre class="lang-py prettyprint-override"><code>fig, ax = plt.subplots(1,2,figsize=(6,6))
  axs = ax.flatten()
  cats = df['rating_cat'].cat.categories.tolist()
  ids_uniques = df.id.unique()
  for i in range(len(ids_uniques)):
      ax[i].bar(df[df['id']==ids_uniques[i]], df['rating'].size())
  </code></pre>
  <p>But it returns me an error <code>TypeError: 'int' object is not callable</code></p>
  <p>Perhaps it's something complicated what I am doing, please, could you guide me with this code</p>