title: How do I aggregate rows in a pandas dataframe according to the latest dates in a column?
body: <p>I have a dataframe containing materials, dates of purchase and purchase prices. I want to filter my dataframe such that I only keep one row containing each material, and that row contains the material at the latest purchase date and corresponding price.</p>
  <p>How could I achieve this? I have racked my brains trying to work out how to apply aggregation functions to this but I just can't work out how.</p>