title: pandas GroupBy plotting each group
body: <p>I have some data from which I want to extract a time series of revenues (sum of <code>Dollars</code> in different dates <code>Day</code> over different locations <code>Where</code>) for different products (<code>x</code> and <code>y</code>).</p>
  
  <pre><code>import pandas as pd
  
  #Create data
  data = {'Day': [1,1,2,2,3,3],
          'Where': ['A','B','A','B','B','B'],
          'What': ['x','y','x','x','x','y'],
          'Dollars': [100,200,100,100,100,200]}
  
  index = range(len(data['Day']))
  
  columns = ['Day','Where','What','Dollars']
  
  
  df = pd.DataFrame(data,  index=index, columns=columns)
  df
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/IJXTbb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IJXTbb.png" alt="ddd"></a></p>
  
  <p>To do so, I group data by <code>Day</code> and <code>What</code> and sum over <code>Dollars</code>:</p>
  
  <pre><code>#Group by Day and What and sum Dollars (for each Where)
  print(df.groupby(['Day', 'What'])['Dollars'].sum())
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/PT6jU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PT6jU.png" alt="ccc"></a></p>
  
  <p>Now, I would like to make a time series for <code>x</code> and <code>y</code> like so:</p>
  
  <p><a href="https://i.stack.imgur.com/HqGRR.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HqGRR.jpg" alt="iii"></a></p>
  
  <p>I tried the following, but it is clearly not working:</p>
  
  <pre><code>items = df.What.unique()
  
  ax = plt.figure()
  for item in items:
      df_tmp = df[['Day']][df.What == item]
      plt.plot(df_tmp['Day'],df_tmp,'.-',label=item)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/YCaxc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YCaxc.png" alt="fff"></a></p>
  
  <p>Can someone, please, put me in the right direction?
  Is there a faster way to get to the right result?</p>