dask_awkward.from_lists

dask_awkward.from_lists

dask_awkward.from_lists(source, behavior=None)[source]

Create a Dask collection from a list of lists.

Parameters

source (list[list[Any]]) – List of lists, each outer list will become a partition in the collection.

Returns

Resulting Array collection.

Return type

Array

Examples

>>> import dask_awkward as dak
>>> a = [[1, 2, 3], [4]]
>>> b = [[5], [6, 7, 8]]
>>> c = dak.from_lists([a, b])
>>> c
dask.awkward<from-lists, npartitions=2>
>>> c.compute()
<Array [[1, 2, 3], [4], [5], [6, 7, 8]] type='4 * var * int64'>