text_plain_output_1.png
import pandas as pd

train = pd.read_csv('../input/train.csv', index_col=0)
test = pd.read_csv('../input/test.csv', index_col=0)

train = train[train['GrLivArea'] < 4000]

labels = train['SalePrice']
train = train.drop('SalePrice', axis=1)

all_data = pd.concat([train, test])

nums = all_data.select_dtypes(exclude=['object']).columns
cat = all_data.select_dtypes(include=['object']).columns

all_data.loc[2611, 'MasVnrType'] = 'BrkFace'
all_data['MasVnrType'].fillna('None', inplace=True)
all_data['MasVnrArea'].fillna(0, inplace=True)

bsmt_num_features = ['BsmtFinSF1', 'BsmtFinSF2', 'BsmtUnfSF', 'TotalBsmtSF', 'BsmtFullBath', 'BsmtHalfBath']
all_data[all_data['BsmtFullBath'].isnull()][bsmt_num_features]

all_data.loc[[2121, 2189], bsmt_num_features] = 0

all_data.loc[[2041, 2186, 2525, 2218, 2219]][bsmt_num_features]

all_data.loc[[2041, 2186, 2525], 'BsmtCond'] = all_data.loc[[2041, 2186, 2525], 'BsmtQual']
all_data.loc[[2218, 2219], 'BsmtQual'] = all_data.loc[[2218, 2219], 'BsmtCond']

all_data.loc[[949, 1488, 2349]][bsmt_num_features]

all_data[all_data['BsmtExposure'].notnull() & (all_data['BsmtExposure'] != 'No')]['BsmtExposure'].value_counts()