pandera.typing.xarray.DataTreeΒΆ
- class pandera.typing.xarray.DataTree(dataset=None, children=None, name=None)[source]ΒΆ
Annotation-only generic for
xarray.DataTree.Create a single node of a DataTree.
The node may optionally contain data in the form of data and coordinate variables, stored in the same way as data is stored in an xarray.Dataset.
ParametersΒΆ
- datasetDataset, optional
Data to store directly at this node.
- childrenMapping[str, DataTree], optional
Any child nodes of this node.
- namestr, optional
Name for this node of the tree.
ReturnsΒΆ
DataTree
See AlsoΒΆ
DataTree.from_dict
Attributes
ancestorsAll parent nodes and their parent nodes, starting with the most distant.
attrsDictionary of global attributes on this node object.
childrenChild nodes of this node, stored under a mapping via their names.
chunksizesMapping from group paths to a mapping of chunksizes.
coordsDictionary of xarray.DataArray objects corresponding to coordinate variables
data_varsDictionary of DataArray objects corresponding to data variables
datasetAn immutable Dataset-like view onto the data in this node.
depthMaximum level of this tree.
descendantsChild nodes and all their child nodes.
dimsMapping from dimension names to lengths.
dsAn immutable Dataset-like view onto the data in this node.
encodingDictionary of global encoding attributes on this node object.
groupsReturn all groups in the tree, given as a tuple of path-like strings.
has_attrsWhether or not there are any metadata attributes in this node.
has_dataWhether or not there are any variables in this node.
indexesMapping of pandas.Index objects used for label based indexing.
is_emptyFalse if node contains any data or attrs.
is_hollowTrue if only leaf nodes contain data.
is_leafWhether this node is a leaf node.
is_rootWhether this node is the tree root.
leavesAll leaf nodes.
levelLevel of this node.
lineageAll parent nodes and their parent nodes, starting with the closest.
nameThe name of this node.
nbytesparentParent of this node.
parentsAll parent nodes and their parent nodes, starting with the closest.
pathReturn the file-like path from the root to this node.
rootRoot node of the tree
siblingsNodes with the same parent as this node.
sizesMapping from dimension names to lengths.
subtreeIterate over all nodes in this tree, including both self and all descendants.
subtree_with_keysIterate over relative paths and node pairs for all nodes in this tree.
variablesLow level interface to node contents as dict of Variable objects.
widthNumber of nodes at this level in the tree.
xindexesMapping of xarray Index objects used for label based indexing.
Methods