ak.from_arrow — Awkward Array 2.8.2 documentation (original) (raw)

Defined in awkward.operations.ak_from_arrow on line 16.

ak.from_arrow(array, *, generate_bitmasks=False, highlevel=True, behavior=None, attrs=None)#

Parameters:

Converts an Apache Arrow array into an Awkward Array.

This function always preserves the values of a dataset; i.e. the Python objects returned by ak.to_list are identical to the Python objects returned by Arrow’sto_pylist method. If ak.to_arrow was invoked with extensionarray=True, this function also preserves the data type (high-level ak.types.Type, though not the low-level ak.forms.Form), even through Parquet, making Parquet a good way to save Awkward Arrays for later use.

Because awkward uses numpy’s dtype system, timestamp types do not have timezones. If encountering timestamp types with timezones in the input arrow data, they will be silently dropped.

See also ak.to_arrow, ak.to_arrow_table, ak.from_parquet, ak.from_arrow_schema.