xarray.DataTree.match#
- DataTree.match(pattern)[source]#
Return nodes with paths matching pattern.
Uses unix glob-like syntax for pattern-matching.
See also
Examples
>>> dt = DataTree.from_dict( ... { ... "/a/A": None, ... "/a/B": None, ... "/b/A": None, ... "/b/B": None, ... } ... ) >>> dt.match("*/B") <xarray.DataTree> Group: / ├── Group: /a │ └── Group: /a/B └── Group: /b └── Group: /b/B