ak.without_field#

Defined in awkward.operations.ak_without_field on line 18.

ak.without_field(array, where, *, highlevel=True, behavior=None, attrs=None)#
Parameters:
  • array – Array-like data (anything ak.to_layout recognizes).

  • where (str or non-empy sequence of str) – If str, the name of the field to be removed. If a sequence, it is interpreted as a path where to remove the field in a nested record.

  • 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.

Returns an ak.Array or ak.Record (or low-level equivalent, if highlevel=False) with an existing field removed. This function does not change the array in-place.

See ak.Array.__delitem__ and ak.Record.__delitem__ for a variant that changes the high-level object in-place. (These methods internally use ak.without_field, so performance is not a factor in choosing one over the other.)