I have a Dataframe like this:
import numpy as np
import pandas as pd
df=pd.DataFrame([['travail','hk','hj'],['test',6,6],[5,5,8],[4,3,1],['moyenne',5,6],[5,6,7],
[1,2,3],['travail','test','kkj'],[5,'hjjd',8],['moyenne',6,7],[5,5,8],[4,3,1],['hkk',5,6],[5,5,8],
[7,8,5]],columns=['A','B','C'])
I want to select all line between travail and moyennee in column A and obtain :
A B C
0 travail hk hj
1 test 6 6
2 5 5 8
3 4 3 1
4 moyenne 5 6
7 travail test kkj
8 5 hjjd 8
9 moyenne 6 7
How can I do that?