dask_expr.DataFrame.to_dask_array

dask_expr.DataFrame.to_dask_array

DataFrame.to_dask_array(lengths=None, meta=None, optimize: bool = True, **optimize_kwargs) dask.array.core.Array

Convert a dask DataFrame to a dask array.

Parameters
lengthsbool or Sequence of ints, optional

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.

metaobject, optional

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

optimizebool

Whether to optimize the expression before converting to an Array.

Returns
A Dask Array