application_vnd.jupyter.stderr_output_1.png
import numpy as np

import pandas as pd

houseprice = pd.read_csv('C:/Users/hp/Desktop/KAGGLE/Ames Houses DATA/train.csv')

houseprice.isnull().sum()

housedfnum = houseprice.select_dtypes(include=[np.number])

housedfcat = houseprice.select_dtypes(include=[object])

housedfcat1 = housedfcat.drop(['Alley', 'FireplaceQu', 'PoolQC', 'Fence', 'MiscFeature'], axis=1)

housedfcat1['MasVnrType'].fillna(housedfcat1['MasVnrType'].value_counts().idxmax(), inplace=True)
housedfcat1['BsmtQual'].fillna(housedfcat1['BsmtQual'].value_counts().idxmax(), inplace=True)
housedfcat1['BsmtCond'].fillna(housedfcat1['BsmtCond'].value_counts().idxmax(), inplace=True)
housedfcat1['BsmtExposure'].fillna(housedfcat1['BsmtExposure'].value_counts().idxmax(), inplace=True)
housedfcat1['BsmtFinType1'].fillna(housedfcat1['BsmtFinType1'].value_counts().idxmax(), inplace=True)
housedfcat1['BsmtFinType2'].fillna(housedfcat1['BsmtFinType2'].value_counts().idxmax(), inplace=True)
housedfcat1['Electrical'].fillna(housedfcat1['Electrical'].value_counts().idxmax(), inplace=True)
housedfcat1['GarageType'].fillna(housedfcat1['GarageType'].value_counts().idxmax(), inplace=True)
housedfcat1['GarageFinish'].fillna(housedfcat1['GarageFinish'].value_counts().idxmax(), inplace=True)
housedfcat1['GarageQual'].fillna(housedfcat1['GarageQual'].value_counts().idxmax(), inplace=True)
housedfcat1['GarageCond'].fillna(housedfcat1['GarageCond'].value_counts().idxmax(), inplace=True)