Skip to content

Instantly share code, notes, and snippets.

@ShrashtiSinghal
Created August 6, 2020 14:20
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 ShrashtiSinghal/2710ef7bb02842082b30585e36e07a90 to your computer and use it in GitHub Desktop.
Save ShrashtiSinghal/2710ef7bb02842082b30585e36e07a90 to your computer and use it in GitHub Desktop.
#Visualize Box plots for outliers
fig, axs = plt.subplots(ncols=5, nrows=3, figsize=(20, 10))
index = 0
axs = axs.flatten()
for k,v in data.items():
sns.boxplot(x=k, data=data, ax=axs[index], color="orange")
index += 1
plt.tight_layout(pad=0.4, w_pad=0.5, h_pad=5.0)
data = data[~(data['MEDV'] >= 50.0)]
print(np.shape(data))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment