title: Filter pyspark DataFrame when column text contains more then 10 words
body: <p>I have a <code>pyspark.sql.dataframe.DataFrame</code> and I want to keep (filter) all rows where one of my columns (called text) has more then 10 words.</p>
  
  <p>I have tried 
  <code>df = df.filter(len(df.text.split())&gt;10)</code> but this throws an exception</p>
  
  <p>How am I suppose to do this properly? 
  Thanks a lot!</p>