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

Defined in awkward.operations.ak_with_name on line 16.

ak.with_name(array, name, *, highlevel=True, behavior=None, attrs=None)#

Parameters:

Returns an ak.Array or ak.Record (or low-level equivalent, ifhighlevel=False) with a new name. This function does not change the array in-place. If the new name is None, then an array without a name is returned.

The records or tuples may be nested within multiple levels of nested lists. If records are nested within records, only the outermost are affected.

Setting the "__record__" parameter makes it possible to add behaviors to the data; see ak.Array and ak.behavior for a more complete description.