text_plain_output_1.png
import matplotlib.pyplot as plt

import matplotlib.pyplot as plt

import numpy as np

import numpy as np # linear algebra

import pandas as pd

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

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

train.shape

train.isnull().sum()

total = train.isnull().sum().sort_values(ascending=False)
percent = (train.isnull().sum() / train.isnull().count()).sort_values(ascending=False)
missing_data = pd.concat([total, percent], axis=1, keys=['Total', 'Percent'])
train = train.drop(missing_data[missing_data['Total'] > 1].index, 1)
train = train.drop(train.loc[train['Electrical'].isnull()].index)
train.isnull().sum().max()

train.isnull().sum()

train.sort_values(by='GrLivArea', ascending=False)[:2]
train = train.drop(train[train['Id'] == 1299].index)
train = train.drop(train[train['Id'] == 524].index)

train['Skewed_SP'] = np.log(train['SalePrice'] + 1)

numerical_features = train.select_dtypes(include=[np.number])
numerical_features