demo_ml_coef2.py:
import pandas from sklearn import linear_model df = pandas.read_csv("cars.csv") X = df[['Weight', 'Volume']] y = df['CO2'] regr = linear_model.LinearRegression() regr.fit(X, y) predictedCO2 = regr.predict([[3300, 1300]]) print(predictedCO2)
C:\Users\My Name>python demo_ml_coef2.py
[114.75968007]