text_plain_output_1.png
import os

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

import numpy as np
import pandas as pd
import os
import matplotlib.pyplot as plt
import seaborn as sns
import missingno
pd.set_option('display.max_columns', 1000)
from IPython.core.interactiveshell import InteractiveShell
InteractiveShell.ast_node_interactivity = 'all'

df = pd.read_csv('../input/train.csv')
d_test = pd.read_csv('../input/test.csv')

df.isna().sum().sort_values(ascending=False)[:20]

for c in df.columns:
    if df[c].dtypes == 'O':
        df[c].fillna(value='none', inplace=True)
    else:
        df[c].fillna(value=0, inplace=True)

objects_list = ['MSSubClass']
linkert_list = ['ExterQual', 'ExterCond', 'BsmtQual', 'BsmtCond', 'BsmtExposure', 'HeatingQC', 'KitchenQual', 'Functional', 'FireplaceQu', 'GarageQual', 'GarageCond', 'PavedDrive', 'Fence']

for c in df.columns:
    if df[c].dtypes == 'O':
        d = df.set_index(c)['SalePrice'].groupby(axis=0, level=0).mean()
        d = round(d / df['SalePrice'].mean() * 100, 1)
        d.name = 'Mean'
        b = df.set_index(c)['SalePrice'].groupby(axis=0, level=0).std()
        b = round(b / df['SalePrice'].std() * 100, 1)
        b.name = 'std'

a = []
for c in linkert_list:
    a.append(df[c].unique().tolist())
label_values = pd.DataFrame(a).T
label_values