I have a small dataframe containing World Record (WR) times for women's 10000m times. Some years a new record was not set but of course, the previous WR persisted to the following year until a new one was set. I want the dataframe to finish in the year 2015.
I need to add rows where the "Year" variable has gaps and fill the gaps with data of the previous WR.
#Current section of dataframe (gap from '86-'93 then '93-2015):
Result Year Event Gender
1 31.35 1982 10000m women
2 31.35 1983 10000m women
3 31.28 1983 10000m women
4 31.14 1984 10000m women
5 30.59 1985 10000m women
6 30.14 1986 10000m women
7 29.32 1993 10000m women
#Required result:
Result Year Event Gender
1 31.35 1982 10000m women
2 31.35 1983 10000m women
3 31.28 1983 10000m women
4 31.14 1984 10000m women
5 30.59 1985 10000m women
6 30.14 1986 10000m women
7 30.14 1987 10000m women
8 30.14 1988 10000m women
9 30.14 1989 10000m women
10 30.14 1990 10000m women
11 30.14 1991 10000m women
12 30.14 1992 10000m women
13 29.32 1993 10000m women
14 29.32 1994 10000m women
...etc
(continue last result until 2015)