Example dataframe:
value
ind
1 2.3
3 4.4
5 3.3
7 6.6
and then I slice with:
df.loc[2:4]
Default output is going to be just:
3 4.4
But I want the upper and lower values included:
1 2.3
3 4.4
5 3.3
Is there a built-in way without some extra logic?