title: How to get an histogram with range of dates with equal interval in X-axis?
body: <p>I have a dataframe which is something like this -</p>
  <pre><code>col_1 | col_2 | col_3 | col_4
  -----------------------------
    A   |  11   | 4/12/2017 | &quot;aaa&quot;
    B   |  22   | 4/04/2003 | &quot;bbb&quot;
    C   |  98   | 4/11/1905 | &quot;ccc&quot;
  ....  ...  ... ... ... ... ..
  ....  ...  ... ... ... ... ..
  ....  ...  ... ... ... ... ..
    Y   |  101  | 8/12/1950 | &quot;ddd&quot;
  </code></pre>
  <p>I am trying to draw an histogram plot with range of years in the X axis and frequency in the Y axis.</p>
  <p>For example -</p>
  <p>If I pass, year = 5, as the argument to my function(which would draw the plot), it should create the histogram with frequency of values between [starting_date(of col_3),starting_date + 5years] as the first bar, then the last date + 5 years, and so on till the last date is reached.</p>
  <p>Each bar should have the values falling in that range of dates.</p>
  <p>My approach -</p>
  <p>I have tried to use <code>pd.interval_range</code> + <code>pd.cut</code> but it didn't seem to work for me.</p>
  <pre><code>interval = pd.interval_range(start=df[&quot;Resignation Date&quot;].min(),end=df[&quot;Resignation Date&quot;].max(),freq='5Y')
  pd.cut(df['Resignation Date'], bins=interval) &lt;-- This doesn't create intervals of 5 years range
  </code></pre>
  <p>When I try to plot the above, it says, <code>TypeError: no numeric data to plot</code></p>
  <p>Any help appreciated.</p>