text_plain_output_1.png
from sklearn.tree import DecisionTreeRegressor

import pandas as pd

import pandas as pd
main_file_path = '../input/train.csv'
df = pd.read_csv(main_file_path)

price = df.SalePrice

columns_of_interest = ['HouseStyle', 'SaleCondition']
two_columns_of_data = df[columns_of_interest]

y = price

columns_of_interest = ['LotArea', 'YearBuilt', '1stFlrSF', '2ndFlrSF', 'FullBath', 'BedroomAbvGr', 'TotRmsAbvGrd']
X = df[columns_of_interest]

from sklearn.tree import DecisionTreeRegressor
myModel = DecisionTreeRegressor()
myModel.fit(X, y)

print('Making predictions for the following 5 houses:')
print(X.head())
print('The predictions are')
print(myModel.predict(X.head()))