dask.dataframe.DataFrame.to_bag
- DataFrame.to_bag(index=False, format='tuple')[source]
Create Dask Bag from a Dask DataFrame
- Parameters
- indexbool, optional
If True, the elements are tuples of
(index, value)
, otherwise they’re just thevalue
. Default is False.- format{“tuple”, “dict”},optional
Whether to return a bag of tuples or dictionaries.
Examples
>>> bag = df.to_bag()