title: Use word count in Pandas dataframe to drop rows with only one word
body: <p>I have a dataframe (data) with 2 records:</p>
  
  <pre><code>id    text
  0001  The farmer plants grain
  0002  tuna
  </code></pre>
  
  <p>I want to count the number of words in the <code>text</code> column of this dataframe and drop rows with only one word.</p>
  
  <p>I know how to count the number of words:</p>
  
  <pre><code>count = data['text'].str.split().str.len()
  </code></pre>
  
  <p>How do I use the results to run an IF statement that will drop rows in the dataframe? Any IF statements such as...</p>
  
  <pre><code>if count == 1:
      print('drop')
  </code></pre>
  
  <p>...results in this error:</p>
  
  <pre><code>Traceback (most recent call last):
  
    File "&lt;ipython-input-118-b3fcb0218e8e&gt;", line 32, in &lt;module&gt;
      if count == 1:
  
    File "C:\Users\taca\AppData\Local\Continuum\Anaconda3\lib\site-packages\pandas\core\generic.py", line 917, in __nonzero__
      .format(self.__class__.__name__))
  
  ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
  </code></pre>
  
  <p>I have read the Pandas documentation and other SO questions around this error, but I can't seem to get the solutions to apply correctly to my issue with the IF statement. </p>
  
  <p>Any advise is greatly appreciated! As I am relatively new to SO, please let me know if there's anything I can do to improve my question.    </p>