I have a dataframe in pandas like:
year quarter value
2018 3 100
2018 4 200
2019 2 300
2019 3 380
2020 1 400
In this I want years 2019-1,2019-4 are missing. I want to create and fill these values with previous row values. So that the output dataframe becomes continuous till current year-quarter which is 2020-3:
year quarter value
2018 3 100
2018 4 200
2019 1 300
2019 2 300
2019 3 380
2019 4 380
2020 1 400
2020 2 400
2020 3 400