I want to select top two rows every 5 rows in pandas dataframe. How could I do this?
Consider the following dataframe:
col1 | col2 | col3
1 | 1 | 1
2. | 2. | 2
3. | 3. | 3
4 | 4 | 4
5. | 5. | 5
6. | 6. | 6
7. | 7. | 7
I would like to get the following values
col1 | col2 | col3
1 | 1 | 1
2. | 2. | 2
and
col1 | col2 | col3
6. | 6. | 6
7. | 7. | 7
I will really appreciate the help!!!