years = [1997, 2016, 2000, 1989]
years = sorted(years)
dfy = pd.DataFrame(pd.Series(years * len(df)).reshape(len(df), len(years)),
    columns=years)
dfy
dfy.apply(lambda x: x.between(df.FIRST.dt.year, df.LAST.dt.year)).astype(int)
df = df.join(dfy.apply(lambda x: x.between(df.FIRST.dt.year, df.LAST.dt.
    year)).astype(int))
df.columns = df.columns.astype(str)
df
How to speed up apply method with lambda in pandas with datetime