title: dask dataframe: generator from partitions
body: <p>I wonder if it's possible to turn <code>dask</code> objects into generators. Specifically, can the following <code>pandas</code>-based generator be replicated using <code>dask</code> dataframe, turning each partition into a generator:</p>
  <pre class="lang-py prettyprint-override"><code>import pandas as pd
  import dask.dataframe as dd
  
  df = pd.DataFrame(range(10), columns=['a'])
  ddf = dd.from_pandas(df, npartitions=3)
  
  def gen_pandas(df):
  # this is a sample function, its content is not
  # important as long as it yields values
      for d in df.iterrows():
          yield d
  
  g = gen_pandas(df)
  next(g), next(g)
  </code></pre>
  <p>As another example (not specific to dask dataframes), suppose I wanted to have generators on workers, such that each worker reads a file and returns contents line by line (just as an example function).</p>
  <p>Apologies if the question doesn't make sense or is an anti-pattern.</p>