to_pyarrow_scalar

to_pyarrow_scalar#

NestedExtensionArray.to_pyarrow_scalar(list_struct: bool = False, large_list: bool = False) LargeListScalar | ListScalar[source]#

Convert to a pyarrow scalar of a list type

Parameters:
  • list_struct (bool, optional) – If False (default), return list-struct-list scalar, otherwise list-list-struct scalar.

  • large_list (bool, optional) – If False (default), use regular list_ (int32 offsets). Set to True to use large_list (int64 offsets), which is required when the total number of nested elements across all rows exceeds ~2.1 billion (int32 max).

Return type:

pyarrow.LargeListScalar or pyarrow.ListScalar