Suppose I have pandas dataframe as:
df=pd.DataFrame({'a':[1,2,3],'b':[4,5,6]})
When I convert it into dask dataframe what should name
and divisions
parameter consist of:
from dask import dataframe as dd
sd=dd.DataFrame(df.to_dict(),divisions=1,meta=pd.DataFrame(columns=df.columns,index=df.index))
TypeError: init() missing 1 required positional argument: 'name'
Edit :
Suppose I create a pandas dataframe like:
pd.DataFrame({'a':[1,2,3],'b':[4,5,6]})
Similarly how to create dask dataframe as it needs three additional arguments as name,divisions
and meta
.
sd=dd.Dataframe({'a':[1,2,3],'b':[4,5,6]},name=,meta=,divisions=)
Thank you for your reply.
question from:
https://stackoverflow.com/questions/39721800/convert-pandas-dataframe-to-dask-dataframe 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…