title: search in dataframe with spliting the text
body: <p>I have a dataframe that consists of two columns, id and text.</p>
  
  <p>I want to retrieve rows that have a text length larger than 2, as an example.</p>
  
  <p>The text length is the number of words in the text rather than the number of chars.</p>
  
  <p>I did the following:</p>
  
  <pre><code>df = pd.DataFrame([{'id': 1, 'text': 'Connected to hgfxg debugger'},
                     {'id': 2, 'text': 'fdss debugger - process 6384 is connecting'},
                     {'id': 3, 'text': 'we are'},
                     ])
  df = df[df['text'].str.len() &gt; 2]
  print(df) #&lt;-- it will print all the sentences above
  </code></pre>
  
  <p>But this retrieve the sentences that have more than 2 chars (in our case, all the sentences above).</p>
  
  <p>How can I achieve what I want in one code line? possible?</p>
  
  <p>I can do it with more than one, like:</p>
  
  <pre><code>df['text_len'] = df['text'].map(lambda x: len(str(x).split()))
  df = df[df['text_len'] &gt; 2]
  print(df) #&lt;-- will print the first two sentences
  </code></pre>