Skip to content

Instantly share code, notes, and snippets.

@breeko
Created March 24, 2018 02:11
Show Gist options
  • Select an option

  • Save breeko/17ff45541b056e224127d8ddd2ab51bd to your computer and use it in GitHub Desktop.

Select an option

Save breeko/17ff45541b056e224127d8ddd2ab51bd to your computer and use it in GitHub Desktop.
f, axes = plt.subplots(nrows=1,ncols=3,figsize=(15,5))
_ = axes[0].hist(df.GRADE_DATE.dt.dayofweek, bins=np.arange(8)-0.5, rwidth=0.95)
axes[0].set_title("Days of week (0 is Monday)")
_ = axes[1].hist(df.GRADE_DATE.dt.day, bins=31)
axes[1].set_title("Day of month")
_ = axes[2].hist(df[df.GRADE_DATE.dt.year < 2018].GRADE_DATE.dt.month, bins=np.arange(1,14)-0.5, rwidth=0.9)
axes[2].set_title("Month")
f.tight_layout()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment