title: Pandas GroupBy date range depending on each row
body: <p>I would like to do the following:</p>
  
  <p>for a data frame that looks like this:</p>
  
  <pre><code>df = pd.DataFrame({"ID":["A", "A", "C" ,"B", "B"], "date":["06/24/2014","06/25/2014","06/23/2014","07/02/1999","07/02/1999"], "value": ["3","5","1","7","8"] })
  </code></pre>
  
  <p>I would like to group by date all those observations that are within 2 days of each other. Then, for example, the first 3 rows would be grouped and the last two would be grouped.</p>
  
  <p>So far, I have thought of using something similar to:</p>
  
  <pre><code>df.groupby(df['date'].map(lambda x: x.month))
  </code></pre>
  
  <p>What is the general way to do this type of "fuzzy groupby"?</p>
  
  <p>thank you,</p>