title: pandas filtering and comparing dates
body: <p>I have a sql file which consists of the data below which I read into pandas.</p>
  
  <pre><code>df = pandas.read_sql('Database count details', con=engine,
                       index_col='id', parse_dates='newest_available_date')
  </code></pre>
  
  <p><strong>Output</strong></p>
  
  <pre><code>id       code   newest_date_available
  9793708  3514   2015-12-24
  9792282  2399   2015-12-25
  9797602  7452   2015-12-25
  9804367  9736   2016-01-20
  9804438  9870   2016-01-20
  </code></pre>
  
  <p>The next line of code is to get last week's date</p>
  
  <pre><code>date_before = datetime.date.today() - datetime.timedelta(days=7) # Which is 2016-01-20
  </code></pre>
  
  <p>What I am trying to do is, to compare <code>date_before</code> with <code>df</code> and print out all rows that is less than <code>date_before</code></p>
  
  <p><code>if (df['newest_available_date'] &lt; date_before):
       print(#all rows)</code> </p>
  
  <p>Obviously this returns me an error <code>The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().</code></p>
  
  <p>How should I do this?</p>