Predicting yearly income with linear regression using Python How to predict the per capita income of Pakistan in 2020 by using linear regression model in Python. The training data is: 

Year    Income
1970    3399.299037
1971    3768.297935
1972    4251.175484
1973    4804.463248
1974    5576.514583
1975    5998.144346
1976    7062.131392
1977    7100.12617
1978    7247.967035
1979    7602.912681
1980    8355.96812
1981    9434.390652
1982    9619.438377
1983    10416.53659
1984    10790.32872
1985    11018.95585
1986    11482.89153
1987    12974.80662
1988    15080.28345
1989    16426.72548
1990    16838.6732
1991    17266.09769
1992    16412.08309
1993    15875.58673
1994    15755.82027
1995    16369.31725
1996    16699.82668
1997    17310.75775
1998    16622.67187
1999    17581.02414
2000    18987.38241
2001    18601.39724
2002    19232.17556
2003    22739.42628
2004    25719.14715
2005    29198.05569
2006    32738.2629
2007    36144.48122
2008    37446.48609
2009    32755.17682
2010    38420.52289
2011    42334.71121
2012    42665.25597
2013    42676.46837
2014    41039.8936
2015    35175.18898
2016    34229.19363
Try:

from sklearn.linear_model import LinearRegression
import numpy as np
regression_model = LinearRegression()
Year = np.array([[1970], [1971], [1972]]) #your data
Income = np.array([3399.299037, 3768.297935, 4251.175484]) #your data
regression_model.fit(Year, Income)
regression_model.predict([[1973]]) #make predictions