image_output_1.png
import missingno as msno # plotting missing data

import pandas as pd # data processing

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import missingno as msno
import seaborn as sns
from sklearn.model_selection import train_test_split, cross_val_score, cross_val_predict
from sklearn import metrics
from sklearn.preprocessing import Imputer
from sklearn.linear_model import LinearRegression
from sklearn.preprocessing import PolynomialFeatures
from sklearn.tree import DecisionTreeRegressor
from sklearn.ensemble import RandomForestRegressor
dataset = pd.read_csv('../input/train.csv')

dataset.isnull().sum()

msno.matrix(df=dataset, figsize=(20, 14), color=(0.5, 0, 0))

dataset = dataset.drop(['Id', 'LotFrontage', 'Alley', 'FireplaceQu', 'PoolQC', 'Fence', 'MiscFeature'], axis=1)
len(dataset.columns)

dataset = dataset.dropna(thresh=70)
msno.matrix(df=dataset, figsize=(20, 14), color=(0.5, 0, 0))

X = dataset.iloc[:, 0:-1]
y = dataset.iloc[:, -1]
X.head()