# xarray.Dataset.to_dask_dataframe

#### Dataset.to_dask_dataframe(dim_order=None, set_index=False)[[source]](https://github.com/pydata/xarray/blob/main/xarray/core/dataset.py#L7673-L7755)

Convert this dataset into a dask.dataframe.DataFrame.

The dimensions, coordinates and data variables in this dataset form
the columns of the DataFrame.

* **Parameters:**
  * **dim_order** ([`list`](https://docs.python.org/3/builtins/stdtypes.html#list), *optional*) – Hierarchical dimension order for the resulting dataframe. All
    arrays are transposed to this order and then written out as flat
    vectors in contiguous order, so the last dimension in this list
    will be contiguous in the resulting DataFrame. This has a major
    influence on which operations are efficient on the resulting dask
    dataframe.

    If provided, must include all dimensions of this dataset. By
    default, dimensions are sorted alphabetically.
  * **set_index** ([`bool`](https://docs.python.org/3/builtins/functions.html#bool), *default*: [`False`](https://docs.python.org/3/builtins/constants.html#False)) – If set_index=True, the dask DataFrame is indexed by this dataset’s
    coordinate. Since dask DataFrames do not support multi-indexes,
    set_index only works if the dataset only contains one dimension.
* **Returns:**
  [`dask.dataframe.DataFrame`](https://docs.dask.org/en/latest/generated/dask.dataframe.DataFrame.html#dask.dataframe.DataFrame)
