title: How to select rows in a DataFrame between two values, in Python Pandas?
body: <p>I am trying to modify a DataFrame <code>df</code> to only contain rows for which the values in the column <code>closing_price</code> are between 99 and 101 and trying to do this with the code below. </p>
  
  <p>However, I get the error </p>
  
  <blockquote>
    <p>ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all()</p>
  </blockquote>
  
  <p>and I am wondering if there is a way to do this without using loops.</p>
  
  <pre><code>df = df[(99 &lt;= df['closing_price'] &lt;= 101)]
  </code></pre>