Skip to content

Instantly share code, notes, and snippets.

@nithyadurai87
Created December 14, 2018 07:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nithyadurai87/5be067164741348c6a51d6af6d8d78b7 to your computer and use it in GitHub Desktop.
Save nithyadurai87/5be067164741348c6a51d6af6d8d78b7 to your computer and use it in GitHub Desktop.
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
df = pd.read_csv("14_input_data.csv")
df = df.fillna(0)
df = df[:100]
y = [i for i in range(0,10)]
fig = plt.figure(figsize=(8,6))
ax = fig.add_subplot(111)
ax.set(title="Total Living Sq.Ft",
ylabel='No of Houses', xlabel='Living Sq.Ft')
ax.hist(df['GrLivArea'])
plt.savefig('Histogram.jpg')
sns.distplot(df['GrLivArea'], hist = False, kde = True,
kde_kws = {'shade': True, 'linewidth': 3})
plt.savefig('DensityPlot.jpg')
fig = plt.figure(figsize=(8,6))
ax = fig.add_subplot(111)
ax.set(title="Total Living Sq.Ft",
ylabel='No of Houses', xlabel='Living Sq.Ft')
ax.boxplot(df['GrLivArea'])
plt.savefig('BoxPlot.jpg')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment