title: Python Pandas: Groupby Sum AND Concatenate Strings
body: <p>Sample Pandas Dataframe:</p>
  
  <pre>ID Name COMMENT1 COMMENT2 NUM
  1  dan  hi       hello    1
  1  dan  you      friend   2
  3  jon  yeah     nope     3
  2  jon  dog      cat      .5
  3  jon  yes      no       .1
  </pre>
  
  <p>I am trying to create a dataframe that groups by ID and NAME that concatenates COMMENT1 and COMMENT2 that also sums NUM.</p>
  
  <p>This is what I'm looking for:</p>
  
  <pre>ID Name COMMENT1     COMMENT2        NUM
  1  dan  hi you       hello friend    3
  3  jon  yeah yes     nope no         3.1
  2  jon  dog          cat             .5
  </pre>
  
  <p>I tried using this:</p>
  
  <pre><code>input_df = input_df.groupby(['ID', 'NAME', 'COMMENT1', 'COMMENT2']).sum().reset_index()
  </code></pre>
  
  <p>But it doesn't work.</p>
  
  <p>If I use this:</p>
  
  <pre><code>input_df = input_df.groupby(['ID']).sum().reset_index()
  </code></pre>
  
  <p>It sums the NUM column but leaves out all other columns.</p>