I have a list of dictionaries of delayed
. The computed value of each delayed
object has to turn into an entry in the dask.Dataframe
.
dfs = []
for source_list in list_of_list:
values1 = {}
values2 = {}
for source in source_list:
intermediate = dask.delayed(myfunc)(source)
source_name = string_manipulation(source)
values1[source_name] = dask.delayed(myfunc1)(intermediate)
values2[source_name] = dask.delayed(myfunc2)(intermediate)
df1 = dd.from_delayed(values1) # TypeError: Expected Delayed object, got str
df2 = dd.from_delayed(values2)
df = dd.concat(df1, df2)
df = df.T # transpose function for dd?
dfs.append(df)
dfs = dd.concat(dfs)
dfs = dfs.compute()
Normally pandas.DataFrame
converts the key of a dictionary to columns. How can this be achieved in dask.DataFrame
? Perhaps there are more efficient methods.
I appreciate your comment.