A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.xarray.dev/en/stable/generated/xarray.DataTree.filter_like.html below:

xarray.DataTree.filter_like

xarray.DataTree.filter_like#
DataTree.filter_like(other)[source]#

Filter a datatree like another datatree.

Returns a new tree containing only the nodes in the original tree which are also present in the other tree.

Parameters:

other (DataTree) – The tree to filter this tree by.

Returns:

DataTree

Examples

>>> dt = DataTree.from_dict(
...     {
...         "/a/A": None,
...         "/a/B": None,
...         "/b/A": None,
...         "/b/B": None,
...     }
... )
>>> other = DataTree.from_dict(
...     {
...         "/a/A": None,
...         "/b/A": None,
...     }
... )
>>> dt.filter_like(other)
<xarray.DataTree>
Group: /
├── Group: /a
│   └── Group: /a/A
└── Group: /b
    └── Group: /b/A

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4