datatree.DataTree.__getitem__#

DataTree.__getitem__(key: str) datatree.datatree.DataTree | xarray.core.dataarray.DataArray[source][source]#

Access child nodes, variables, or coordinates stored anywhere in this tree.

Returned object will be either a DataTree or DataArray object depending on whether the key given points to a child or variable.

Parameters

key (str) – Name of variable / child within this node, or unix-like path to variable / child within another node.

Returns

Union[DataTree, DataArray]