title: Pandas Groupby: How to get the first string
body: <p>I have this dataframe: </p>
  
  <pre><code>dfexample = pd.DataFrame({'OID' : [7, 7, 7, 7],
                        'Category' : ['Plumbing', 'Plumbing', 'Plumbing', 'Plumbing'],
                        'Product_Type' : ['Accessory', 'Shower Accessories', 'Showers', 'Showers'],
                        'Extended_Price' : [20.5, 12.12, 122.45, 225.98]})
  </code></pre>
  
  <p>I want to group this dataframe by 'OID', and get the 'first' string of my object columns (<code>Category</code> and <code>Product_Type</code>), so in this case <code>'plumbing'</code> and <code>'accessory'</code>. Desired Output:</p>
  
  <pre><code>[in]:dfgrouped
  
  [out]:
  OID       Category         Extended_Price     Product_Type
  7         Plumbing         381.05             Accessory  
  </code></pre>
  
  <p>Right now, I have this which concatenates all the strings together, and doesn't return the 'first' string.</p>
  
  <pre><code>def f(x):
  return pd.Series(dict(Category = x['Category'].sum(),
                       Extended_Price = x['Extended_Price'].sum(),
                        Product_Type = x['Product_Type'].sum() 
                       ))
  dfexample.groupby('OID').apply(f)
  </code></pre>