pyarrow.compute.list_flatten#

pyarrow.compute.list_flatten(lists, /, recursive=False, *, options=None, memory_pool=None)#

Flatten list values.

lists must have a list-like type (lists, list-views, and fixed-size lists). Return an array with the top list level flattened unless recursive is set to true in ListFlattenOptions. When that is that case, flattening happens recursively until a non-list array is formed.

Null list values do not emit anything to the output.

Parameters:
listsArray-like

Argument to compute function.

recursivebool, default False

When True, the list array is flattened recursively until an array of non-list values is formed.

optionspyarrow.compute.ListFlattenOptions, optional

Alternative way of passing options.

memory_poolpyarrow.MemoryPool, optional

If not passed, will allocate memory from the default memory pool.