Skip to content

Instantly share code, notes, and snippets.

@JarrydWannenburg
Last active August 17, 2022 19:31
Show Gist options
  • Save JarrydWannenburg/2971e6c4cc3c7f122336bfa4f2a61848 to your computer and use it in GitHub Desktop.
Save JarrydWannenburg/2971e6c4cc3c7f122336bfa4f2a61848 to your computer and use it in GitHub Desktop.
House_Prices_Adv_Reg
# Try/Except to append multiple altair charts to a list
myl = []
for col in dataset.columns:
try:
myl.append(chart(dataset, col, target_var))
except:
pass
else:
pass
# Compile all charts in the list to one html document
a = myl[0]
for i in range(1,len(myl)):
a = a & myl[i]
a.properties(
title = 'Feature Histograms & Boxplots'
).configure_axis(labelFontSize=15, titleFontSize=25)
a.save('figures/Feature_Visuals.html')
# Check if all variables were visualized
print('Features accounted for:', len(myl), 'out of', len(dataset.T))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment