# xarray.DataArray.drop_isel

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

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('78f19def-af62-4dda-ae27-c817d15b6db8','8def0c5f-77dc-4e03-a0b8-1b1bbb4adbfd','5c365e75-51e9-41d4-87ff-1a69bbe6f004','../lite/tree/../notebooks/index.html?path=275bef94_96e9_441f_bb15_4524ed9c9237.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="5c365e75-51e9-41d4-87ff-1a69bbe6f004" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('78f19def-af62-4dda-ae27-c817d15b6db8','5c365e75-51e9-41d4-87ff-1a69bbe6f004')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('78f19def-af62-4dda-ae27-c817d15b6db8','5c365e75-51e9-41d4-87ff-1a69bbe6f004')">Open In Tab</button></div><div id="8def0c5f-77dc-4e03-a0b8-1b1bbb4adbfd" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
