4

I need to create a a dask DataFrame from a set of dask Series, analogously to constructing a pandas DataFrame from lists

pd.DataFrame({'l1': list1, 'l2': list2})

I am not seeing anything in the API. The dask DataFrame constructor is not supposed to be called by users directly and takes a computation graph as it's mainargument.

Daniel Mahler
  • 7,653
  • 5
  • 51
  • 90

1 Answers1

8

In general I agree that it would be nice for the dd.DataFrame constructor to behave like the pd.DataFrame constructor.

If your series have well defined divisions then you might try dask.dataframe.concat with axis=1.

You could also try converting one of the series into a DataFrame and then use assignment syntax:

L = # list of series
df = L[0].to_frame()
for s in L[1:]:
    df[s.name] = s
MRocklin
  • 55,641
  • 23
  • 163
  • 235