title: Maximum Date Per Group in pandas DataFrame
body: <p>I have found similar questions to this but nothing working with dates in DataFrames grouped by multiple columns.</p>
  
  <p>I have a pandas DataFrame that looks like this:</p>
  
  <pre><code>    person_ref  post_start   post_number  post_title                   change_date
  0   123         2010-08-08   000492       Doorman                      2014-04-17
  1   123         2010-08-08   000492       Doorman/Porter               2014-01-14
  2   123         2010-08-08   000492       Uniformed Security Officer   2005-12-16
  3   123         2011-04-03   000554       Security Officer             2011-01-01
  4   123         2010-07-15   000568       Night Security Officer       2010-06-30
  5   456         2012-09-17   5080         HR Systems &amp; MI Analyst      2013-08-13
  6   456         2012-09-17   5080         HR Systems &amp; MI Adviser      2011-04-07
  7   456         2012-09-17   5080         HRIS Adviser                 2010-06-14
  8   456         2012-09-17   5080         HR Systems Assistant         2007-09-21
  </code></pre>
  
  <p>This shows two employees (<code>person_ref</code>), the posts that they have held (<code>post_number</code>), and the titles that the posts have had through their history (<code>post_title</code>). <code>post_start</code> is the date that the employee started in the post, and <code>change_date</code> is the date that the post title was changed.</p>
  
  <p>I want to end up with a DataFrame that shows for each employee only the post title when they started in post:</p>
  
  <pre><code>    person_ref  post_start   post_number  post_title                   change_date
  0   123         2010-08-08   000492       Uniformed Security Officer   2005-12-16
  1   123         2011-04-03   000554       Security Officer             2011-01-01
  2   123         2010-07-15   000568       Night Security Officer       2010-06-30
  3   456         2012-09-17   5080         HR Systems &amp; MI Adviser      2011-04-07
  </code></pre>
  
  <p>What this boils down to is the maximum <code>change_date</code> that is less than or equal to the <code>post_start</code> date per <code>person_ref</code> per <code>post_number</code>.</p>
  
  <p>How I can achieve this in pandas? I guess I need to group by <code>person_ref</code> and <code>post_number</code>, but I'm struggling to then get only the row with the correct change date.</p>