image_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

import pandas as pd

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

import seaborn as sns

path = '../input/train.csv'

df = pd.read_csv(path)

df.columns

fig = plt.figure(2)
ax1 = fig.add_subplot(2, 2, 1)
ax2=fig.add_subplot(2,2,2)
ax3=fig.add_subplot(2,2,3)
ax4=fig.add_subplot(2,2,4)
df.plot.scatter(x='LotFrontage',y='SalePrice',ax=ax1)
df.plot.scatter(x='LotArea',y='SalePrice',ax=ax2)
df.plot.scatter(x='MSSubClass',y='SalePrice',ax=ax3)
df.plot.scatter(x='OverallQual',y='SalePrice',ax=ax4)
plt.show()

sns.set()
cols = list(df.columns)

X = df.drop('SalePrice', axis=1)

X_con = X.select_dtypes(exclude='object')

X_cat = X.select_dtypes(include='object')

X_cat_col = list(X_cat.columns)

X_cat.isnull().sum()

X_cat.drop(['PoolQC', 'Fence', 'MiscFeature'], axis=1, inplace=True)

X_cat.drop('Alley', 1, inplace=True)

X_cat.isnull().sum()