How to transform Dask.DataFrame to pd.DataFrame?

Philipp_Kats picture Philipp_Kats · Aug 18, 2016 · Viewed 15.3k times · Source

How can I transform my resulting dask.DataFrame into pandas.DataFrame (let's say I am done with heavy lifting, and just want to apply sklearn to my aggregate result)?

Answer

MRocklin picture MRocklin · Aug 18, 2016

You can call the .compute() method to transform a dask.dataframe to a pandas dataframe:

df = df.compute()