title: Error when using variables to filter dataframe with multiple conditions (Pandas)
body: <p>I'm trying to make a temporary dataframe that is created by filtering an existing dataframe (<code>stock_data</code>) based on two criteria;</p>
  <ol>
  <li>The <code>stock_data</code> ticker column is matching the <code>tick_id</code> variable</li>
  <li>The <code>stock_data</code> date column is within a range from <code>start</code> to <code>end</code> (the variables are created using <code>pd.to_datetime</code>)</li>
  </ol>
  <p>I've attempted this using two different solutions</p>
  <p>First:</p>
  <pre><code>temp = stock_data[(stock_data.ticker == tick_id) &amp; (stock_data[&quot;date&quot;].isin(pd.date_range(start, end)))]
  </code></pre>
  <p>Second:</p>
  <pre><code>mask = (stock_data.ticker == tick_id) &amp; ((stock_data.date &gt; start) &amp; (stock_data.date &lt;= end))
  
  temp = stock_data.loc[mask]
  </code></pre>
  <p>Both solutions result in the same error:</p>
  <p><code>ValueError: Can only compare identically-labeled Series objects</code></p>