# xarray.DataTree.drop_nodes

#### DataTree.drop_nodes(names, , errors='raise')[[source]](https://github.com/pydata/xarray/blob/main/xarray/core/datatree.py#L1209-L1245)

Drop child nodes from this node.

* **Parameters:**
  * **names** ([`str`](https://docs.python.org/3/builtins/stdtypes.html#str) or [iterable](https://docs.python.org/3/glossary.html#term-iterable) of [`str`](https://docs.python.org/3/builtins/stdtypes.html#str)) – Name(s) of nodes to drop.
  * **errors** (`{"raise", "ignore"}`, *default*: `"raise"`) – If ‘raise’, raises a KeyError if any of the node names
    passed are not present as children of this node. If ‘ignore’,
    any given names that are present are dropped and no error is raised.
* **Returns:**
  **dropped** ([`DataTree`](xarray.DataTree.html.md#xarray.DataTree)) – A copy of the node with the specified children dropped.
