# xarray.DataArray.drop_isel

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

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('ec838db0-2583-4604-890d-4a15a28c09f7','2d384403-c693-4628-94ba-ac4416976792','d777ff21-4424-45d1-96a2-26a60edcdc33','../lite/tree/../notebooks/index.html?path=ef132390_934f_414f_b837_97f2fb673770.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="d777ff21-4424-45d1-96a2-26a60edcdc33" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('ec838db0-2583-4604-890d-4a15a28c09f7','d777ff21-4424-45d1-96a2-26a60edcdc33')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('ec838db0-2583-4604-890d-4a15a28c09f7','d777ff21-4424-45d1-96a2-26a60edcdc33')">Open In Tab</button></div><div id="2d384403-c693-4628-94ba-ac4416976792" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
