1from sklearn import linear_model
2regr = linear_model.LinearRegression()
3train_x = np.asanyarray(train[['ENGINESIZE']])
4train_y = np.asanyarray(train[['CO2EMISSIONS']])
5regr.fit (train_x, train_y)
6# The coefficients
7print ('Coefficients: ', regr.coef_)
8print ('Intercept: ',regr.intercept_)