# dask.dataframe.DataFrame.to_dask_array

#### DataFrame.to_dask_array(lengths=None, meta=None, optimize: [bool](https://docs.python.org/3/builtins/functions.html#bool) = True, \*\*optimize_kwargs) → [Array](dask.array.Array.html.md#dask.array.Array)

Convert a dask DataFrame to a dask array.

* **Parameters:**
  **lengths**
  : How to determine the chunks sizes for the output array.
    By default, the output array will have unknown chunk lengths
    along the first axis, which can cause some later operations
    to fail.
    * True : immediately compute the length of each partition
    * Sequence : a sequence of integers to use for the chunk sizes
      on the first axis. These values are *not* validated for
      correctness, beyond ensuring that the number of items
      matches the number of partitions.

  **meta**
  : An optional meta parameter can be passed for dask to override the
    default metadata on the underlying dask array.

  **optimize**
  : Whether to optimize the expression before converting to an Array.
* **Returns:**
  A Dask Array

<!-- !! processed by numpydoc !! -->
