title: Hourly time series in minutes between two timestamps using Pandas
body: <p>I have a range of timestamps with start time and end time. I would like to generate the number of minutes per hour between the two timestamps:</p>
  
  <pre><code>import pandas as pd
  
  start_time = pd.to_datetime('2013-03-26 21:49:08',infer_datetime_format=True)
  end_time = pd.to_datetime('2013-03-27 05:21:00, infer_datetime_format=True)
  
  pd.date_range(start_time, end_time, freq='h')
  </code></pre>
  
  <p>which gives:</p>
  
  <pre><code>DatetimeIndex(['2013-03-26 21:49:08', '2013-03-26 22:49:08',
                 '2013-03-26 23:49:08', '2013-03-27 00:49:08',
                 '2013-03-27 01:49:08', '2013-03-27 02:49:08',
                 '2013-03-27 03:49:08', '2013-03-27 04:49:08'],
                dtype='datetime64[ns]', freq='H')
  </code></pre>
  
  <p>Sample result: I would like to compute the number of minutes bounded by the hour between the start and end times, like below: </p>
  
  <pre><code> 2013-03-26 21:00:00'  - 10m 52secs
   2013-03-26 22:00:00'  - 60 m 
   2013-03-26 23:00:00'  - 60 m
  
   2013-03-27 05:00:00'  - 21 m 
  </code></pre>
  
  <p>I have looked at pandas resample, but not exactly sure how to achieve this. Any direction is appreciated.</p>