text_plain_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

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

housing_data = pd.read_csv('/kaggle/input/california-housing-prices/housing.csv')
data = housing_data.copy()

housing_data.shape

housing_data.duplicated().values.any()

housing_data.isnull().sum()

def outlier_check(data_check):
    q1 = data_check.quantile(0.25)
    q3 = data_check.quantile(0.75)
    iqr = q3 - q1
    lower_limit = q1 - 1.5 * iqr
    upper_limi = q3 + 1.5 * iqr
    lower_outlier = data_check < lower_limit
    upper_outlier = data_check > upper_limi
    return data_check[lower_outlier | upper_outlier]
for col_name, values in housing_data.items():
    if housing_data[col_name].dtype == 'float64':
        percntge = len(outlier_check(housing_data[col_name])) / len(housing_data) * 100
        print(col_name, ':', percntge, '%')