# xarray.DataTree.isel

#### DataTree.isel(indexers=None, drop=False, missing_dims='raise', \*\*indexers_kwargs)[[source]](https://github.com/pydata/xarray/blob/main/xarray/core/datatree.py#L2330-L2390)

Returns a new data tree with each array indexed along the specified
dimension(s).

This method selects values from each array using its \_\_getitem_\_
method, except this method does not require knowing the order of
each array’s dimensions.

* **Parameters:**
  * **indexers** ([`dict`](https://docs.python.org/3/builtins/stdtypes.html#dict), *optional*) – A dict with keys matching dimensions and values given
    by integers, slice objects or arrays.
    indexer can be an integer, slice, array-like or DataArray.
    If DataArrays are passed as indexers, xarray-style indexing will be
    carried out. See [Indexing and selecting data](../user-guide/indexing.html.md#indexing) for the details.
    One of indexers or indexers_kwargs must be provided.
  * **drop** ([`bool`](https://docs.python.org/3/builtins/functions.html#bool), *default*: [`False`](https://docs.python.org/3/builtins/constants.html#False)) – If `drop=True`, drop coordinates variables indexed by integers
    instead of making them scalar.
  * **missing_dims** (`{"raise", "warn", "ignore"}`, *default*: `"raise"`) – What to do if dimensions that should be selected from are not present in the
    Dataset:
    - “raise”: raise an exception
    - “warn”: raise a warning, and ignore the missing dimensions
    - “ignore”: ignore the missing dimensions
  * **\*\*indexers_kwargs** (`{dim: indexer, ...}`, *optional*) – The keyword arguments form of `indexers`.
    One of indexers or indexers_kwargs must be provided.
* **Returns:**
  **obj** ([`DataTree`](xarray.DataTree.html.md#xarray.DataTree)) – A new DataTree with the same contents as this data tree, except each
  array and dimension is indexed by the appropriate indexers.
  If indexer DataArrays have coordinates that do not conflict with
  this object, then these coordinates will be attached.
  In general, each array’s data will be a view of the array’s data
  in this dataset, unless vectorized indexing was triggered by using
  an array indexer, in which case the data will be a copy.

#### SEE ALSO
[`DataTree.sel`](xarray.DataTree.sel.html.md#xarray.DataTree.sel), [`Dataset.isel`](xarray.Dataset.isel.html.md#xarray.Dataset.isel)
