<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Multivariate Regression
Let's grab a small little data set of Blue Book car values
Step1:  We can use pandas to split up this matrix into the feature vectors we're interested in, and the value we're trying to predict.
Note how we are avoiding the make and model; regressions don't work well with ordinal values, unless you can convert them into some numerical order that makes sense somehow.
Let's scale our feature data into the same range so we can easily compare the coefficients we end up with.
<ASSISTANT_TASK:>
Python Code:
import pandas as pd
df = pd.read_excel('http://cdn.sundog-soft.com/Udemy/DataScience/cars.xls')
df.head()
Explanation: Multivariate Regression
Let's grab a small little data set of Blue Book car values:
End of explanation
import statsmodels.api as sm
from sklearn.preprocessing import StandardScaler
scale = StandardScaler()
X = df[['Mileage', 'Cylinder', 'Doors']]
y = df['Price']
X[['Mileage', 'Cylinder', 'Doors']] = scale.fit_transform(X[['Mileage', 'Cylinder', 'Doors']].as_matrix())
print (X)
est = sm.OLS(y, X).fit()
est.summary()
y.groupby(df.Doors).mean()
Explanation: We can use pandas to split up this matrix into the feature vectors we're interested in, and the value we're trying to predict.
Note how we are avoiding the make and model; regressions don't work well with ordinal values, unless you can convert them into some numerical order that makes sense somehow.
Let's scale our feature data into the same range so we can easily compare the coefficients we end up with.
End of explanation
<END_TASK>