title: groupby by max of column and returns the complete row
body: <p>I have a dataframe with 5 different columns. My actual problem is groupby a specific field with a max() and return the row that fulfils this condition.</p>
  
  <p>Example (I put the code and a print-screen of the data frames):</p>
  
  <pre><code>A = pd.DataFrame([[datetime(2005,1,1), datetime(2005,1,2),  1240, 1234, 12],\
        [datetime(2005,1,1), datetime(2005,1,2), 1250, 1235, 13], 
        [datetime(2005,1,1), datetime(2005,1,3), 1230, 1235, 12],
        [datetime(2005,1,1), datetime(2005,1,3), 1240, 1235, 13],
        [datetime(2005,1,1), datetime(2005,1,4), 1240, 1235, 12],
        [datetime(2005,1,1), datetime(2005,1,5), 1240, 1235, 13],
        [datetime(2005,1,1), datetime(2005,1,5), 1240, 1233, 11],
        [datetime(2005,1,1), datetime(2005,1,6), 1240, 1235, 14]], \
       columns=['quote_date', 'expiration', 'strike', 'price', 'var']).set_index(['quote_date', 'expiration', 'strike'])
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/6PcmM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6PcmM.png" alt="enter image description here"></a></p>
  
  <p>If I groupby by <em>strike</em>, I will get only the <em>quote_date</em>, <em>expiration</em> and <em>strike</em>:</p>
  
  <pre><code>A.reset_index().groupby(by = ['quote_date', 'expiration'])['strike'].max()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/o15xA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/o15xA.png" alt="enter image description here"></a></p>
  
  <p>The goal is to obtain the following dataframe:</p>
  
  <p><a href="https://i.stack.imgur.com/QPkeQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QPkeQ.png" alt="enter image description here"></a></p>