title: Python Keep other columns when using sum() with groupby
body: <p>I have a pandas dataframe below:</p>
  
  <pre><code>    df
  
      name    value1    value2  otherstuff1 otherstuff2 
  0   Jack       1         1       1.19        2.39     
  1   Jack       1         2       1.19        2.39
  2   Luke       0         1       1.08        1.08  
  3   Mark       0         1       3.45        3.45
  4   Luke       1         0       1.08        1.08
  </code></pre>
  
  <p>Same "name" will have the same value for otherstuff1 and otherstuff2.</p>
  
  <p>I'm trying to groupby by column 'name' and sum column 'value1' and sum column 'value2' (Not sum value1 with value2!!! But sum them individually in each column)</p>
  
  <p>Expecting to get result below:</p>
  
  <pre><code>    newdf
  
      name    value1    value2  otherstuff1 otherstuff2 
  0   Jack       2         3       1.19        2.39     
  1   Luke       1         1       1.08        1.08  
  2   Mark       0         1       3.45        3.45
  </code></pre>
  
  <p>I've tried </p>
  
  <pre><code>newdf = df.groupby(['name'], as_index = False).sum()
  </code></pre>
  
  <p>which groupsby name and sums up both value1 and value2 columns correctly but end up dropping column otherstuff1 and otherstuff2.</p>
  
  <p>Please help. Thank you guys so much!</p>