Skip to content

Instantly share code, notes, and snippets.

@rchardptrsn
Created January 29, 2020 12:26
Show Gist options
  • Save rchardptrsn/1fc1225b2f438c822a11c6585309a47f to your computer and use it in GitHub Desktop.
Save rchardptrsn/1fc1225b2f438c822a11c6585309a47f to your computer and use it in GitHub Desktop.
import matplotlib.pyplot as plt
import seaborn as sns
# Subset only the rows where GDP is NaN
gdp_nans = melted_data[melted_data['GDP'].isnull()]
# seaborn barplot of NaNs per year
plt.figure(figsize=(10,6))
ax = sns.countplot(x='Year',data=gdp_nans)
plt.title('Count of NaNs per Year')
plt.xticks(rotation=90)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment