dask.dataframe.DataFrame.get_partition

dask.dataframe.DataFrame.get_partition

DataFrame.get_partition(n)

Get a dask DataFrame/Series representing the nth partition.

Parameters
nint

The 0-indexed partition number to select.

Returns
Dask DataFrame or Series

The same type as the original object.

Examples

>>> import dask
>>> ddf = dask.datasets.timeseries(start="2021-01-01", end="2021-01-07", freq="1h")
>>> ddf.get_partition(0)  
Dask DataFrame Structure:
                 name     id        x        y
npartitions=1
2021-01-01     string  int64  float64  float64
2021-01-02        ...    ...      ...      ...
Dask Name: get-partition, 3 graph layers