You can also use the standard Series.between function along with the time object from the datetime library. Piggybacking off of @unutbu's example:
import pandas as pd
import numpy as np
from datetime import time
N = 100
df = pd.DataFrame(
{
"date": pd.date_range("2000-1-1", periods=N, freq="H"),
"value": np.random.random(N),
}
)
df.loc[df["date"].dt.time.between(time(20, 0), time(21, 0))]
In this way you can still use the "inclusive" parameter and you don't have to mess with indexes.