title: Generating random dates within a given range in pandas
body: <p>This is a self-answered post. A common problem is to randomly generate dates between a given start and end date. </p>
  
  <p>There are two cases to consider:</p>
  
  <ol>
  <li>random dates with a time component, and </li>
  <li>random dates without time</li>
  </ol>
  
  <p>For example, given some start date <code>2015-01-01</code> and an end date <code>2018-01-01</code>, how can I sample N random dates between this range using pandas?</p>