text_html_output_1.png text_plain_output_1.png
import numpy as np

import pandas as pd

train = pd.read_csv('../input/massp-housing-prices-in-melbourne/train.csv', index_col='id')
test = pd.read_csv('../input/massp-housing-prices-in-melbourne/test.csv', index_col='id')

duplicate_row = train[train.duplicated()]

train.dtypes.value_counts()

def missing_values_table(df):
    mis_val = df.isnull().sum()
    mis_val_percent = 100 * df.isnull().sum() / len(df)
    mis_val_table = pd.concat([mis_val, mis_val_percent], axis=1)
    mis_val_table_ren_columns = mis_val_table.rename(columns={0: 'Missing Values', 1: '% of Total Values'})
    mis_val_table_ren_columns = mis_val_table_ren_columns[mis_val_table_ren_columns.iloc[:, 1] != 0].sort_values('% of Total Values', ascending=False).round(1)
    return mis_val_table_ren_columns
missing_values_table(train)

missing_values_table(test)