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

import pandas as pd

import seaborn as sns

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

train = pd.read_csv('09-house-train.csv')
test = pd.read_csv('09-house-test.csv')

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

train.iloc[0:5, :3]

null_cols = pd.DataFrame(train.isnull().sum().sort_values(ascending=False), columns=['Null Data Count'])
null_cols_pct = pd.DataFrame(round(train.isnull().sum().sort_values(ascending=False) / len(train), 2) * 100, columns=['Null Data Pct'])
null_cols_df = pd.DataFrame(pd.concat([null_cols, null_cols_pct], axis=1))
all_nulls = null_cols_df[null_cols_df['Null Data Pct'] > 0]
all_nulls

plt.figure(figsize=(12, 8))
sns.barplot(x=all_nulls.index, y='Null Data Pct', data=all_nulls)
plt.xticks(rotation='90')
plt.xlabel('Features', fontsize=15)
plt.ylabel('Percent of Missing Values', fontsize=15)
plt.title('Percent of Missing Data by Feature', fontsize=15)