title: Check previous unique values based on time intervals
body: <p>I have a df of fruit purchases sorted by person and time. For each unique name, I want to check if they purchased the same fruit within the last 5 minutes? How could I create this column?</p>
  <pre><code>   name  fruit  time   purchased_same_fruit_within5minutes
  0  Amy   apple 10:00      False
  1  Amy   pear  10:04      False
  2  Amy   apple 10:06      False (10:00 apple purchase was 6 minutes ago)
  3  Amy   pear  10.07      True (pear at 10:04)
  4  Ben   ...
  </code></pre>