# xarray.DataArray.drop_isel

#### DataArray.drop_isel(indexers=None, \*\*indexers_kwargs)[[source]](https://github.com/pydata/xarray/blob/v2026.09.0/xarray/core/dataarray.py#L3499-L3548)

Drop index positions from this DataArray.

* **Parameters:**
  * **indexers** ([mapping](https://docs.python.org/3/glossary.html#term-mapping) of `Hashable` to `Any` or [`None`](https://docs.python.org/3/builtins/constants.html#None), *default*: [`None`](https://docs.python.org/3/builtins/constants.html#None)) – Index locations to drop
  * **\*\*indexers_kwargs** (`{dim: position, ...}`, *optional*) – The keyword arguments form of `dim` and `positions`
* **Returns:**
  **dropped** ([`DataArray`](xarray.DataArray.html.md#xarray.DataArray))
* **Raises:**
  [**IndexError**](https://docs.python.org/3/builtins/exceptions.html#IndexError) – 

### Examples

<div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesShowIframe('7f75a237-3cd1-4786-8230-ef26756420ed','a9f11010-3689-42f3-b32b-0bd32eefa592','d3970bf3-9b60-436c-82f0-f122d2b55dc2','../lite/tree/../notebooks/index.html?path=b1473c2c_91df_4394_bd0c_9949d8452f24.ipynb','None')">Try it in your browser!</button></div>
```pycon
>>> da = xr.DataArray(np.arange(25).reshape(5, 5), dims=("X", "Y"))
>>> da
<xarray.DataArray (X: 5, Y: 5)> Size: 200B
array([[ 0,  1,  2,  3,  4],
       [ 5,  6,  7,  8,  9],
       [10, 11, 12, 13, 14],
       [15, 16, 17, 18, 19],
       [20, 21, 22, 23, 24]])
Dimensions without coordinates: X, Y
```

```pycon
>>> da.drop_isel(X=[0, 4], Y=2)
<xarray.DataArray (X: 3, Y: 4)> Size: 96B
array([[ 5,  6,  8,  9],
       [10, 11, 13, 14],
       [15, 16, 18, 19]])
Dimensions without coordinates: X, Y
```

```pycon
>>> da.drop_isel({"X": 3, "Y": 3})
<xarray.DataArray (X: 4, Y: 4)> Size: 128B
array([[ 0,  1,  2,  4],
       [ 5,  6,  7,  9],
       [10, 11, 12, 14],
       [20, 21, 22, 24]])
Dimensions without coordinates: X, Y
```

<div id="d3970bf3-9b60-436c-82f0-f122d2b55dc2" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('7f75a237-3cd1-4786-8230-ef26756420ed','d3970bf3-9b60-436c-82f0-f122d2b55dc2')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('7f75a237-3cd1-4786-8230-ef26756420ed','d3970bf3-9b60-436c-82f0-f122d2b55dc2')">Open In Tab</button></div><div id="a9f11010-3689-42f3-b32b-0bd32eefa592" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
