Created
December 20, 2021 22:19
-
-
Save ageller/54cbc157ad25e1fd52446cc952ae8144 to your computer and use it in GitHub Desktop.
create a histogram with dates
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
import numpy as np | |
f, ax = matplotlib.pyplot.subplots() | |
minDate = np.datetime64('2011-01-01') | |
maxDate = np.datetime64('2019-01-01') | |
bins = np.arange(minDate, maxDate, np.timedelta64(1, 'M'), dtype = 'datetime64[M]') | |
ax.hist(df['CREATION DATE'], bins = bins, orientation = 'horizontal') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment