Attention
This repository has been archived. Please use xarray.DataTree instead.
datatree.DataTree.get#
- DataTree.get(key: str, default: DataTree | DataArray | None = None) DataTree | DataArray | None [source][source]#
Access child nodes, variables, or coordinates stored in this node.
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. Must lie in this immediate node (not elsewhere in the tree).default (
DataTree | DataArray
, optional) – A value to return if the specified key does not exist. Default return value is None.