Given a dataframe, how do I get every nth row within some range of rows?
for instance, suppose I have this dataframe:
i | A | B |
---|------|-----|
0 | 0.2 | 33 |
1 | 0.3 | 77 |
2 | 10 | 77 |
3 | 30 | 33 |
4 | 27 | 20 |
5 | 99 | 8 |
6 | 100 | 33 |
7 | 27 | 33 |
8 | 27 | 77 |
how could I extract every other row between index 2 and 7?