# dask.dataframe.Index.between

#### Index.between(left, right, inclusive='both')

Return boolean Series equivalent to left <= series <= right.

This docstring was copied from pandas.Series.between.

Some inconsistencies with the Dask version may exist.

This function returns a boolean vector containing True wherever the
corresponding Series element is between the boundary values left and
right. NA values are treated as False.

* **Parameters:**
  **left**
  : Left boundary.

  **right**
  : Right boundary.

  **inclusive**
  : Include boundaries. Whether to set each bound as closed or open.
* **Returns:**
  Series
  : Series representing whether each element is between left and
    right (inclusive).

#### SEE ALSO
[`Series.gt`](dask.dataframe.Series.gt.html.md#dask.dataframe.Series.gt)
: Greater than of series and other.

[`Series.lt`](dask.dataframe.Series.lt.html.md#dask.dataframe.Series.lt)
: Less than of series and other.

### Notes

This function is equivalent to `(left <= ser) & (ser <= right)`

### Examples

```pycon
>>> s = pd.Series([2, 0, 4, 8, np.nan])
```

Boundary values are included by default:

```pycon
>>> s.between(1, 4)
0     True
1    False
2     True
3    False
4    False
dtype: bool
```

With inclusive set to `"neither"` boundary values are excluded:

```pycon
>>> s.between(1, 4, inclusive="neither")
0     True
1    False
2    False
3    False
4    False
dtype: bool
```

left and right can be any scalar value:

```pycon
>>> s = pd.Series(["Alice", "Bob", "Carol", "Eve"])
>>> s.between("Anna", "Daniel")
0    False
1     True
2     True
3    False
dtype: bool
```

<!-- !! processed by numpydoc !! -->
