code :

```
>>> s = pd.Series([True, False, True, True, False, False, False, True])
>>> s[s].index
Int64Index([0, 2, 3, 7], dtype='int64')
```

```
>>> s[s].index.values
array([0, 2, 3, 7])
```

```
>>> np.nonzero(s)
(array([0, 2, 3, 7]),)
```

```
>>> np.flatnonzero(s)
array([0, 2, 3, 7])
```

```
>>> np.where(s)[0]
array([0, 2, 3, 7])
```

```
>>> np.argwhere(s).ravel()
array([0, 2, 3, 7])
```

```
>>> s.index[s]
array([0, 2, 3, 7])
```

```
>>> [*filter(s.get, s.index)]
[0, 2, 3, 7]
```

```
>>> [i for i in s.index if s[I]]
[0, 2, 3, 7]
```