title: How to check if two dates falls between two columns of dataframe representing start date and end date
body: <p>I am trying to check if my start date and end date falls between the given StartDate and EndDate in my dataframe</p>
  
  <p>DataFrame looks like </p>
  
  <pre><code>TermYear Term   StartDate      EndDate
   2017     1     2017-01-10    2017-03-31
   2017     2     2017-04-10    2017-06-30
   2017     3     2017-07-24    2017-09-18
   2017     4     2017-09-30    2017-12-04
  </code></pre>
  
  <p>I am trying to fetch the term and TermYear when my given date i.e. </p>
  
  <pre><code>Start Date: '2017-01-24'
  End Date: '2017-09-29'
  </code></pre>
  
  <p>Lies between start and end date of dataframe it should fetch multiple rows any ideas?
  I have tried </p>
  
  <pre><code>lowerDate = np.datetime64('2017-07-24')
  upperDate = np.datetime64('2017-07-26')
  termDates = termDates[(termDates.StartDate &gt;= lowerDate) &amp;
                        (termDates.EndDate &lt;= upperDate) ][['Term', 'TermYear']]
  </code></pre>
  
  <p>But it returns me empty dataframe</p>
  
  <p>Expected output:</p>
  
  <pre><code>Term    TermYear
   2017     1     
   2017     2     
   2017     3     
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/fQbub.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fQbub.png" alt="What i tried and its output"></a></p>