text_plain_output_1.png
import matplotlib.pyplot as plt

import missingno as msno

import numpy as np

import numpy as np # linear algebra

import pandas as pd

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

import seaborn as sns

pd.set_option('display.max_columns', None)
pd.set_option('display.max_rows', 20)

test = pd.read_csv('../input/house-prices-advanced-regression-techniques/test.csv')
train = pd.read_csv('../input/house-prices-advanced-regression-techniques/train.csv')

train.shape

train = train.drop(['Id'], axis=1)

missingdata_df = train.columns[train.isnull().any()].tolist()
msno.matrix(train[missingdata_df])

target = np.log(train['SalePrice'])
target.skew()

train = train.drop(['PoolQC', 'MiscFeature', 'Alley', 'Fence', 'FireplaceQu'], axis=1)

numeric_data = train.select_dtypes(include=[np.number])
categorical_data = train.select_dtypes(exclude=[np.number])

corr = numeric_data.corr()
mask = np.triu(np.ones_like(corr, dtype=np.bool))
f, ax = plt.subplots(figsize=(11, 9))
plt.title('Correlation of Numeric Features', y=1, size=16)
cmap = sns.diverging_palette(220, 10, as_cmap=True)
sns.heatmap(corr, mask=mask, cmap=cmap, vmax=0.3, center=0, square=True, linewidths=0.5, cbar_kws={'shrink': 0.5})