Defined in awkward.operations.ak_from_avro_file on line 17.

ak.from_avro_file(file, limit_entries=None, *, debug_forth=False, highlevel=True, behavior=None, attrs=None)#
  • file (path-like or file-like object) – Avro file to be read as Awkward Array.

  • limit_entries (int) – The number of rows of the Avro file to be read into the Awkward Array.

  • debug_forth (bool) – If True, prints the generated Forth code for debugging.

  • highlevel (bool) – If True, return an ak.Array; otherwise, return a low-level ak.contents.Content subclass.

  • behavior (None or dict) – Custom ak.behavior for the output array, if high-level.

  • attrs (None or dict) – Custom attributes for the output array, if high-level.

Reads Avro files as Awkward Arrays.

Internally this function uses AwkwardForth DSL. The function recursively parses the Avro schema, generates Awkward form and Forth code for that specific Avro file and then reads it.