-
-
Save jurand71/d0288d6d4b7e7f3a7362134c68774135 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import libraries | |
import numpy as np | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
# Display all columns | |
pd.set_option('display.max_columns', None) | |
# Ignore warnings | |
import warnings | |
warnings.filterwarnings('ignore') | |
# Import Houseprice data from GitHub | |
df = pd.read_csv('https://github.com/jurand71/datasets/raw/master/HouseSalePriceCompetition/houseprice.csv') | |
# Determine numerical and positive variables and other than 'Id' | |
variables = [] | |
for var in df.columns: | |
if var not in ["Id","SalePrice"] and df[var].dtypes != "O": | |
if np.sum(np.where(df[var] <= 0, 1, 0)) == 0: | |
variables.append(var) | |
# Explore the distribution of selected variables | |
df[variables].hist(figsize=(15,15)) | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment