title: Error: The truth value of a Series is ambiguous - Python pandas
body: <p>I know this question has been asked before, however, when I am trying to do an <code>if</code> statement and I am getting an error. I looked at this <a href="https://stackoverflow.com/questions/36921951/truth-value-of-a-series-is-ambiguous-use-a-empty-a-bool-a-item-a-any-o">link</a> , but did not help much in my case. My <code>dfs</code> is a list of DataFrames. </p>
  
  <p>I am trying the following,</p>
  
  <pre><code>for i in dfs:
      if (i['var1'] &lt; 3.000):
         print(i)
  </code></pre>
  
  <p>Gives the following 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><strong>AND</strong> I tried the following and getting the same error.</p>
  
  <pre><code>for i,j in enumerate(dfs):
      if (j['var1'] &lt; 3.000):
         print(i)
  </code></pre>
  
  <p>My <code>var1</code> data type is <code>float32</code>. I am not using any other <code>logical</code> operators and <code>&amp;</code> or <code>|</code>. In the above link it seemed to be because of using logical operators. Why do I get <code>ValueError</code>?</p>