Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
7.0.0
Description
Hi ! Right now when one wants to reconstruct a ListArray using ListArrar.from_arrays, the `null` values may be lost:
import pyarrow as pa
arr = pa.array([None, [0]])
reconstructed_arr = pa.ListArray.from_arrays(arr.offsets, arr.values)
print(reconstructed_arr.to_pylist())
# [[], [0]]
It would be nice to have a `mask` parameter to `ListArray.from_arrays` (or any way to provide the validity bitmap) to be able to reconstruct the original array with the `null` values.
It would also be consistent with `StructArray.from_arrays` that already has the `mask` parameter.
Attachments
Issue Links
- links to