title: Expand Pandas Group By to Many Columns
body: <p>I have a dataframe like this,</p>
  
  <p>create a data frame <code>data</code></p>
  
  <pre><code>d = {'Machine ID': [100, 100, 101, 101], 'Machine': ["ABC", "ABC", "CDQ", "CDQ"], 
      "June": [10,0,12,15], "July": [12,15,0,32], "August": [0,15,20,11]}
  data = pd.DataFrame(data=d)
  </code></pre>
  
  <p>Data Frame:</p>
  
  <pre><code> Machine ID Machine June    July    August
  0   100     ABC      10     12     0
  1   100     ABC      0      15     15
  2   101     CDQ      12     0      20
  3   101     CDQ      15     32     11
  </code></pre>
  
  <p>Now, I want to <code>groupby</code> and aggregate by month, so, I did this,</p>
  
  <pre><code>machine_group = data.groupby(['Machine ID','Machine'])['June'].sum().reset_index(name = 'June Sum')
  </code></pre>
  
  <p>I get the following,</p>
  
  <pre><code> Machine ID Machine June Sum
  0   100     ABC     10
  1   101     CDQ     27
  </code></pre>
  
  <p>However, I need an ouput something like this</p>
  
  <pre><code>         Machine ID Machine June Sum July Sum August Sum
      0   100     ABC         10       27       15
      1   101     CDQ         27       32       31
  </code></pre>
  
  <p>How can I expand my group by code to get them lines up. Otherwise, for now, my option is to group by each month and append grouped column into a new data frame. 
  Any suggestion will be appreciated. </p>