title: Pandas series with multiple values how to plot it correctly
body: <p>I have the following data:</p>
  
  <pre><code>1, method1, 3, type1, 73.9203
  2, method1, 3, type1, 38.6353
  3, method1, 3, type1, 38.0158
  4, method1, 3, type1, 19.6426
  5, method1, 3, type1, 52.3507
  6, method2, 3, type2, 500.048
  7, method2, 3, type1, 14.5179
  8, method2, 3, type2, 500.029
  9, method2, 3, type1, 267.738
  10, method2, 3, type2, 500.008
  11, method1, 4, type2, 500.036
  12, method1, 4, type1, 271.698
  13, method1, 4, type1, 309.884
  14, method1, 4, type1, 103.91
  15, method1, 4, type1, 478.43
  16, method2, 4, type2, 500.071
  17, method2, 4, type2, 500.033
  18, method2, 4, type2, 500.151
  19, method2, 4, type2, 500.09
  20, method2, 4, type2, 500.009
  </code></pre>
  
  <p>I read those data using Python Pandas:</p>
  
  <pre><code>import pandas
  import matplotlib.pyplot as plt
  
  data_frames = pandas.read_csv("results2.txt", sep=r',\s+', engine = "python", header=None)
  data_frames.columns = ["id", "method", "number", "type", "running_time"]
  
  print(data_frames)
  </code></pre>
  
  <p>Which is successful:</p>
  
  <pre><code>    id   method  number   type  running_time
  0    1  method1       3  type1       73.9203
  1    2  method1       3  type1       38.6353
  2    3  method1       3  type1       38.0158
  3    4  method1       3  type1       19.6426
  4    5  method1       3  type1       52.3507
  5    6  method2       3  type2      500.0480
  6    7  method2       3  type1       14.5179
  7    8  method2       3  type2      500.0290
  8    9  method2       3  type1      267.7380
  9   10  method2       3  type2      500.0080
  10  11  method1       4  type2      500.0360
  11  12  method1       4  type1      271.6980
  12  13  method1       4  type1      309.8840
  13  14  method1       4  type1      103.9100
  14  15  method1       4  type1      478.4300
  15  16  method2       4  type2      500.0710
  16  17  method2       4  type2      500.0330
  17  18  method2       4  type2      500.1510
  18  19  method2       4  type2      500.0900
  19  20  method2       4  type2      500.0090
  </code></pre>
  
  <p>What I would like to do is to create a bar chart plot of the data:</p>
  
  <ul>
  <li>x-axis: distinct <code>number</code>s per method.</li>
  <li>y-axis: number of types.</li>
  </ul>
  
  <p>So I have the following code:</p>
  
  <pre><code>series = data_frames.groupby(["number", "method", "type"])["type"].count()
  </code></pre>
  
  <p>Which gives:</p>
  
  <pre><code>number  method   type
  3       method1  type1    5
          method2  type1    2
                   type2    3
  4       method1  type1    4
                   type2    1
          method2  type2    5
  Name: type, dtype: int64
  </code></pre>
  
  <p>So the bar chart should look something like this:
  <a href="https://i.stack.imgur.com/9I8Ot.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9I8Ot.png" alt="enter image description here"></a></p>
  
  <p>So basically, I want a bar chart that as x-axis values we have the distinct <code>number</code> per <code>method</code> each bar representing a stack of <code>type</code> of that <code>method</code>.</p>
  
  <p>Before I found out that I can plot using <code>matplotlib</code> and <code>pandas</code> I was manually finding those values and then I was plotting as I wanted, but now that I see with Pandas you can have a more clean, readable and beautiful code I would like to do it in the best way possible.</p>
  
  <p>What I have tried is:</p>
  
  <pre><code>ax = series.plot(kind='bar',
                   x="number",
                   y=["type", "method"],
                   legend=True)
  
  plt.show()
  </code></pre>
  
  <p>But the result is not near of what I am looking for:</p>
  
  <p><a href="https://i.stack.imgur.com/eDvDh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eDvDh.png" alt="enter image description here"></a></p>