demo_ml_coef.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) print(regr.coef_)
C:\Users\My Name>python demo_ml_coef.py
[0.00755095 0.00780526]