xarray.DataTree.__getitem__#
- DataTree.__getitem__(key)[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
DataTree | DataArray