- ak.to_arrow_table(array, explode_records=False, list_to32=False, string_to32=True, bytestring_to32=True)¶
array – Data to convert to an Apache Arrow table.
explode_records (bool) – If True, lists of records are written as records of lists, so that nested fields become top-level fields (which can be zipped when read back).
list_to32 (bool) – If True, convert Awkward lists into 32-bit Arrow lists if they’re small enough, even if it means an extra conversion. Otherwise, signed 32-bit
ak.layout.ListOffsetArraymaps to Arrow
ListTypeand all others map to Arrow
string_to32 (bool) – Same as the above for Arrow
bytestring_to32 (bool) – Same as the above for Arrow
Converts an Awkward Array into an Apache Arrow table (
array does not contain records at top-level, the Arrow table will consist
of one field whose name is
Arrow tables can maintain the distinction between “option-type but no elements are
missing” and “not option-type” at all levels, including the top level. However,
there is no distinction between
?union[X, Y, Z]] type and
union[?X, ?Y, ?Z] type.
Be aware of these type distinctions when passing data through Arrow or Parquet.