title: Filter data using date range using Pandas
body: <p>What am I missing here?</p>
  <p>Python Script:</p>
  <pre><code># -*- coding: utf-8 -*-
  import pandas as pd
  import sys
  from dateutil.relativedelta import relativedelta
  import datetime
  
  reload(sys)
  sys.setdefaultencoding('utf-8')
  
  today = datetime.date.today()
  three_mon_rel = relativedelta(months=-3)
  three_months_period = (today + three_mon_rel).strftime('%m/%d/%Y').lstrip('0')
  
  data = pd.read_csv('output.csv')
  rslt_df = data[data['collectedDate'] &gt;= three_months_period]
  print(rslt_df)
  </code></pre>
  <p>CSV file:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>ageRange</th>
  <th>city</th>
  <th>collectedDate</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>60 to 69</td>
  <td>A</td>
  <td>1/22/2021</td>
  </tr>
  <tr>
  <td>10 to 19</td>
  <td>B</td>
  <td>10/14/2020</td>
  </tr>
  <tr>
  <td>70 to 79</td>
  <td>C</td>
  <td>4/29/2021</td>
  </tr>
  <tr>
  <td>80 to 89</td>
  <td>C</td>
  <td>6/23/2021</td>
  </tr>
  <tr>
  <td>50 to 59</td>
  <td>A</td>
  <td>7/23/2020</td>
  </tr>
  <tr>
  <td>50 to 59</td>
  <td>B</td>
  <td>7/23/2020</td>
  </tr>
  <tr>
  <td>30 to 39</td>
  <td>B</td>
  <td>9/14/2020</td>
  </tr>
  <tr>
  <td>50 to 59</td>
  <td>B</td>
  <td>3/13/2021</td>
  </tr>
  <tr>
  <td>20 to 29</td>
  <td>A</td>
  <td>4/23/2020</td>
  </tr>
  <tr>
  <td>20 to 29</td>
  <td>A</td>
  <td>7/2/2020</td>
  </tr>
  <tr>
  <td>0 to 9</td>
  <td>A</td>
  <td>6/22/2020</td>
  </tr>
  <tr>
  <td>60 to 69</td>
  <td>A</td>
  <td>7/7/2020</td>
  </tr>
  <tr>
  <td>20 to 29</td>
  <td>B</td>
  <td>12/18/2020</td>
  </tr>
  <tr>
  <td>40 to 49</td>
  <td>C</td>
  <td>10/7/2020</td>
  </tr>
  <tr>
  <td>0 to 9</td>
  <td>A</td>
  <td>7/11/2020</td>
  </tr>
  <tr>
  <td>10 to 19</td>
  <td>A</td>
  <td>12/18/2020</td>
  </tr>
  <tr>
  <td>0 to 9</td>
  <td>C</td>
  <td>4/21/2021</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I need to extract (filter) to a new table the records that meet the criteria, that is, any record that is equal or greater than three_months_period. The script executes successfully but returns all records except the first one. I am expecting the following result:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>ageRange</th>
  <th>city</th>
  <th>collectedDate</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>70 to 79</td>
  <td>C</td>
  <td>4/29/2021</td>
  </tr>
  <tr>
  <td>80 to 89</td>
  <td>C</td>
  <td>6/23/2021</td>
  </tr>
  <tr>
  <td>0 to 9</td>
  <td>C</td>
  <td>4/21/2021</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>Thanks in advance!</p>