text_plain_output_1.png image_output_1.png
import matplotlib.pyplot as plt

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

import seaborn as sns

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

train.isnull().any().sum()

train.columns[train.isnull().any()]

missing = train.isnull().sum() / len(train)
missing = missing[missing > 0]
missing.sort_values(inplace=True)
missing

missing = pd.DataFrame(missing)
missing.columns = ['count']
missing.index.names = ['name']
missing['name'] = missing.index

plt.xticks(rotation=90)

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

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

pivot = train.pivot_table(index='OverallQual', values='SalePrice', aggfunc='median')

train.GarageCars.unique()
pivot = train.pivot_table(index='GarageCars', values='SalePrice', aggfunc='median')
pivot.plot(kind='bar')