text_plain_output_1.png
import matplotlib.pyplot as plt

import numpy as np

import numpy as np

import pandas as pd

import seaborn as sns

data = pd.read_csv('../input/house-prices-advanced-regression-techniques/train.csv')
y = data['SalePrice']
data.drop(columns=['SalePrice'], inplace=True)

data.skew().sort_values(ascending=False)

data.kurt().sort_values(ascending=False)

missingVals = data.isnull().mean() * 100
missingVals.sort_values(ascending=False).head(20)

data.drop(columns=['Alley', 'Fence', 'PoolQC', 'MiscFeature', 'FireplaceQu', 'Id'], inplace=True)

corr = data.corr()
kot = corr[np.abs(corr) >= 0.7]

data.drop(columns=['GarageArea', 'GrLivArea', 'GarageYrBlt'], inplace=True)

y = data.SalePrice
data.drop(columns=['SalePrice'], inplace=True)

data.columns

def get_num_cat_features(type_features, data):
    return data.select_dtypes(include=type_features)
numerics = ['int64', 'float64']
newdf_num = get_num_cat_features(numerics, data)
newdf_cat = data.select_dtypes(['object'])

newdf_num.shape