title: Preserve the non-numerical columns when doing pandas.DataFrame.groupby().sum()
body: <p>Can I preserve the non-numerical columns (the 1st appeared value) when doing pandas.DataFrame.groupby().sum() ?</p>
  
  <p>For example, I have a DataFrame like this:</p>
  
  <pre><code>df = pd.DataFrame({'A' : ['aa1', 'aa2', 'aa1', 'aa2'],'B' : ['bb1', 'bbb1', 'bb2', 'bbb2'],'C' : ['cc1', 'ccc2', 'ccc3', 'ccc4'],'D' : [1, 2, 3, 4],'E' : [1, 2, 3, 4]})
  &gt;&gt;&gt; df
       A     B     C  D  E
  0  aa1   bb1   cc1  1  1
  1  aa2  bbb1  ccc2  2  2
  2  aa1   bb2  ccc3  3  3
  3  aa2  bbb2  ccc4  4  4
  &gt;&gt;&gt; df.groupby(["A"]).sum()
       D  E
  A        
  aa1  4  4
  aa2  6  6
  </code></pre>
  
  <p>Following is the result I want to obtain:</p>
  
  <pre><code>     B    C    D  E
  A        
  aa1  bb1  cc1  4  4
  aa2  bbb1 ccc2 6  6
  </code></pre>
  
  <p>Notice that the value of column <code>B</code> and <code>C</code>  is the first associated B value and C value of each group key.</p>