image_output_11.png image_output_17.png image_output_14.png image_output_13.png image_output_5.png image_output_18.png image_output_7.png image_output_4.png image_output_8.png image_output_16.png image_output_6.png image_output_12.png image_output_3.png image_output_2.png image_output_1.png image_output_10.png image_output_15.png image_output_9.png
import matplotlib.pyplot as plt

import numpy as np

import pandas as pd

dataset = pd.read_csv('/kaggle/input/house-prices-advanced-regression-techniques/train.csv')

dataset.isnull().sum()

features_with_na = []
for features in dataset.columns:
    if dataset[features].isnull().sum() > 1:
        features_with_na.append(features)
features_with_na

features_with_na = [features for features in dataset.columns if dataset[features].isnull().sum() > 1]

for feature in features_with_na:
    data = dataset.copy()
    data[feature] = np.where(data[feature].isnull(), 1, 0)

numerical_features = [feature for feature in dataset.columns if dataset[feature].dtypes != 'O']

year_feature = [feature for feature in numerical_features if 'Yr' in feature or 'Year' in feature]
year_feature