text_plain_output_1.png
import pandas as pd

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

df_train.shape

pd.options.display.min_rows = 500
df_train.isnull().sum()

pd.options.display.min_rows = 500
df_train.isna().sum()

df_train.drop(['LotFrontage', 'Alley', 'PoolQC', 'Fence', 'MiscFeature'], axis=1, inplace=True)

pd.options.display.min_rows = 500
pd.set_option('display.max_columns', None)
df_train.isnull().sum()

df_train.drop(['BsmtQual', 'BsmtCond', 'FireplaceQu', 'GarageType', 'GarageYrBlt', 'GarageFinish', 'GarageQual', 'GarageCond'], axis=1, inplace=True)

pd.options.display.min_rows = 500
pd.set_option('display.max_columns', None)
df_train.loc[:, 'BsmtExposure':'Electrical'].isnull().sum()

df_train.drop(['BsmtExposure', 'BsmtFinType1', 'BsmtFinType2'], axis=1, inplace=True)

df_train.shape

df_train.dropna(inplace=True)
df_train.shape