title: DASK Dataframe within loops
body: <p>I'm having some trouble trying to implement loops in Dask.
  for example in the following code:</p>
  
  <pre><code>for i in range(len(col)):
      if df[col[i]].dtype=='object':
          pass
      elif df[col[i]].std().compute()==0:
          cols_constant.append(col[i])
  df = df.drop(cols_constant,axis=1)
  </code></pre>
  
  <p>The same code is very quick using pandas but on dask it is taking a considerable amount of time to complete the task.</p>
  
  <p>I understand Dask is inefficient over loops.
  But how can I optimize my code for Dask for functions similar to the one above?</p>
  
  <p>I cannot use e.persist() since we intend to do the computation on multiple worker systems.</p>
  
  <p>Will it be useful to use the function 'dask.do' to parallelize the same task?</p>