title: Pandas DataFrame - how to merge groupby calculations back into DataFrame?
body: <p>I am new to DataFrames. After a groupby aggregate calculation, it produces a DataFrame/data series with only the groupby keys and calculated value. </p>
  
  <p>for a dataframe: -</p>
  
  <pre><code>df=pd.dataframe.merge(left,right,left_on=['key1','key2'],right_on=['key1','key2']).groupby(['colA','colB'])['colC'].sum()
  </code></pre>
  
  <p>df would generate a dataframe of A, B, sum(C). I want to have a resultset that has column left.D as well but its not part of a key or computation, how do it do that?</p>