title: how can i shorten this looping over the table time procces
body: <p>im looking to sum up the number of words above 8 letters that got written in the 'text' column/
  the table has above 500,000 values.
  i am not inough familiar with panda.</p>
  <pre><code>
  def howmany8(array):  //returns the amount of words above 8 letter
    counter=0;
    for i in range(len(array)):
      if(len(array[i])&gt;8):
        counter+=counter
    return counter 
  
  
  newdf= df;
  newdf.dropna(subset = ['text'])
  newdf['wordssum']=newdf['text']
  
  for i in range(len(newdf['text'])):
    newdf['wordssum'][i]= howmany8(re.split(&quot;\s&quot;,newdf['text'][i]))
  print(newdf['words'].sum())
  
  </code></pre>