I have a data frame DF
, with three columns and n rows shown below:
Month Year Default
1 2015 T
2 2015 T
3 2015 F
4 2015 T
5 2015 T
6 2015 T
7 2015 F
I would like to check if there are 3 T in a roll and keep going then print out all the starting year and month into a new DF.
I need to obtain the output as shown above. The output should like:
Month Year
4 2015