ak.with_name¶
Defined in awkward.operations.structure on line 868.
- ak.with_name(array, name, highlevel=True, behavior=None)¶
- Parameters
base – Data containing records or tuples.
name (str) – Name to give to the records or tuples; this assigns the
"__record__"
parameter.highlevel (bool) – If True, return an
ak.Array
; otherwise, return a low-levelak.layout.Content
subclass.behavior (None or dict) – Custom
ak.behavior
for the output array, if high-level.
Returns an ak.Array
or ak.Record
(or low-level equivalent, if
highlevel=False
) with a new name. This function does not change the
array in-place.
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.