From 183902d11e361f9979b7a4786cb2a03f8c4dcdb3 Mon Sep 17 00:00:00 2001 From: nemkothari Date: Wed, 14 Nov 2018 07:59:34 +0000 Subject: [PATCH 1/4] Done --- q01_plot/build.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/q01_plot/build.py b/q01_plot/build.py index 0425964..56716dd 100644 --- a/q01_plot/build.py +++ b/q01_plot/build.py @@ -1,8 +1,15 @@ +# %load q01_plot/build.py +# Default imports import matplotlib.pyplot as plt import seaborn as sns import pandas as pd - data = pd.read_csv('data/house_prices_multivariate.csv') -plt.switch_backend('agg') -# Write your code here : +# Write your code here: +def plot(num_cols): + for i in num_cols: + sns.distplot(data[i]) + plt.show() + + + From d3e90a8e118c10b8e5f495a566e406c676a31af8 Mon Sep 17 00:00:00 2001 From: nemkothari Date: Fri, 16 Nov 2018 06:30:33 +0000 Subject: [PATCH 2/4] Done --- q02_plot/build.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/q02_plot/build.py b/q02_plot/build.py index 67b4924..ee50e21 100644 --- a/q02_plot/build.py +++ b/q02_plot/build.py @@ -1,11 +1,17 @@ +# %load q02_plot/build.py # Default imports import pandas as pd import matplotlib.pyplot as plt import seaborn as sns data = pd.read_csv('data/house_prices_multivariate.csv') -plt.switch_backend('agg') + +def plot(num_cols): + #data[num_cols].boxplot() + for i in num_cols: + sns.boxplot(data[i]) + plt.show() + -# Write your code here: From 8fc52edce633247ff1183372570997b81f8f9e2a Mon Sep 17 00:00:00 2001 From: nemkothari Date: Fri, 16 Nov 2018 06:54:28 +0000 Subject: [PATCH 3/4] Done --- q03_regression_plot/build.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/q03_regression_plot/build.py b/q03_regression_plot/build.py index 2aaf8f6..bf48e4a 100644 --- a/q03_regression_plot/build.py +++ b/q03_regression_plot/build.py @@ -1,3 +1,4 @@ +# %load q03_regression_plot/build.py # Default imports import pandas as pd @@ -6,10 +7,10 @@ data = pd.read_csv('data/house_prices_multivariate.csv') -plt.switch_backend('agg') - -# Write your code here +def regression_plot(variable1,variable2): + sns.regplot( x=variable1 , y =variable2 , data=data) + plt.show() From ea8a3ce224f7b7847e048deb19cf18d12f61042e Mon Sep 17 00:00:00 2001 From: nemkothari Date: Fri, 16 Nov 2018 07:16:33 +0000 Subject: [PATCH 4/4] Done --- q04_cor/build.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/q04_cor/build.py b/q04_cor/build.py index f3fae50..556bde0 100644 --- a/q04_cor/build.py +++ b/q04_cor/build.py @@ -1,10 +1,15 @@ +# %load q04_cor/build.py # Default imports import pandas as pd import matplotlib.pyplot as plt import seaborn as sns data = pd.read_csv('data/house_prices_multivariate.csv') -plt.switch_backend('agg') + +def cor(data): + df_cor = data.corr() + sns.heatmap(df_cor) + plt.show() + -# Write your code here