Suppose there is a data frame as follows:
df = {
'Period': [1996,'Jan','Feb','March',1997,'Jan','Feb','March',1998,'Jan','Feb','March']
'Some-Values': [,'a','b','c',,'d','e','f',,'g',h','i']
}
and the rows between the values 1996 and 1997 needs to be extracted such that the resulting data frame is as follows:
df_res = {
'Period': ['Jan','Feb','March']
'Some-Values': ['a','b','c']
}
I am currently trying Pandas for this but am unable to find a solution.