Change date in linear regression model
Slice your DataFrame accordingly, and then apply your previous routine (you may want to put this in a function) to this part of the data:

df2 = df.loc[df.Year &gt;= 1950]