title: How to Convert Dask DataFrame Into List of Dictionaries?
body: <p>I need to convert a dask dataframe into a list of dictionaries as the response for an API endpoint. I know I can convert the dask dataframe to pandas, and then from there I can convert to dictionary, but it would be better to map each partition to a dict, and then concatenate.</p>
  
  <p>What I tried:</p>
  
  <pre><code>df = dd.read_csv(path, usecols=cols)
  
  dd.compute(df.to_dict(orient='records'))
  </code></pre>
  
  <p>Error I'm getting:</p>
  
  <pre><code>AttributeError: 'DataFrame' object has no attribute 'to_dict'
  </code></pre>