title: Calculate commit percentage per time with most productive time
body: <p>I want to show the percentage of commits per time in a given time frame. I mean if the time frame is of 1 year then show cummulative commit percentage in each time for that time range i.e a year with most productive time.</p>
  <p>I could find out commit per hour and commit per weekday in such way</p>
  <pre><code>commit_per_hour = commit_data.Date.dt.hour.value_counts(sort=False)
  
  commits_per_weekday = commit_data.Date.dt.weekday.value_counts(sort=False)
  </code></pre>
  <p><a href="https://i.stack.imgur.com/CdqLW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CdqLW.png" alt="enter image description here" /></a></p>
  <pre><code>after = pd.to_datetime(&quot;2020-12-28&quot;, utc=True)
  before = pd.to_datetime(&quot;2021-04-10&quot;, utc=True)
  df = self.df[(self.df[&quot;date&quot;] &gt; after) &amp; (self.df[&quot;date&quot;] &lt; before)]
  # commits_per_weekday = df.date.dt.isocalendar().week.value_counts(sort=False)
  commits_per_weekday = df.date.d
  </code></pre>
  <p>output:</p>
  <pre><code>09:40:58    2
  04:53:31    3
  03:34:44    6
  06:21:04    2
  08:11:39    1
  </code></pre>
  <p>but not in below fashion (12 am to 12 pm)</p>
  <p><a href="https://i.stack.imgur.com/6sPat.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6sPat.png" alt="enter image description here" /></a></p>
  <p>this is what my df looks like</p>
  <pre><code>        sha timestamp   date    author  message body    age insertion   deletion    filepath    churn   merges
  1   1   cae635054   Sat Jun 26 14:51:23 2021 -0400  2021-06-26 18:51:23+00:00   Andrew Clark    `act`: Resolve to return value of scope function (#21759)   When migrating some internal tests I found it annoying that I couldn't  -24 days +12:21:32.839997                   
  2   21  cae635054   Sat Jun 26 14:51:23 2021 -0400  2021-06-26 18:51:23+00:00   Andrew Clark    `act`: Resolve to return value of scope function (#21759)   When migrating some internal tests I found it annoying that I couldn't  -24 days +12:21:32.839997   31.0    0.0 packages/react-reconciler/src/__tests__/ReactIsomorphicAct-test.js  31.0    
  3   22  cae635054   Sat Jun 26 14:51:23 2021 -0400  2021-06-26 18:51:23+00:00   Andrew Clark    `act`: Resolve to return value of scope function (#21759)   When migrating some internal tests I found it annoying that I couldn't  -24 days +12:21:32.839997   1.0 1.0 packages/react-test-renderer/src/ReactTestRenderer.js   0.0 
  4   23  cae635054   Sat Jun 26 14:51:23 2021 -0400  2021-06-26 18:51:23+00:00   Andrew Clark    `act`: Resolve to return value of scope function (#21759)   When migrating some internal tests I found it annoying that I couldn't  -24 days +12:21:32.839997   24.0    14.0    packages/react/src/ReactAct.js  10.0    
  5   25  e2453e200   Fri Jun 25 15:39:46 2021 -0400  2021-06-25 19:39:46+00:00   Andrew Clark    act: Add test for bypassing queueMicrotask (#21743) Test for fix added in #21740    -25 days +13:09:55.839997   50.0    0.0 packages/react-reconciler/src/__tests__/ReactIsomorphicAct-test.js  50.0    
  6   27  73ffce1b6   Thu Jun 24 22:42:44 2021 -0400  2021-06-25 02:42:44+00:00   Brian Vaughn    DevTools: Update tests to fix warnings/errors (#21748)  Some new ones had slipped in (e.g. deprecated ReactDOM.render message from 18)  -26 days +20:12:53.839997   4.0 5.0 packages/react-devtools-shared/src/__tests__/FastRefreshDevToolsIntegration-test.js -1.0    
  7   28  73ffce1b6   Thu Jun 24 22:42:44 2021 -0400  2021-06-25 02:42:44+00:00   Brian Vaughn    DevTools: Update tests to fix warnings/errors (#21748)  Some new ones had slipped in (e.g. deprecated ReactDOM.render message from 18)  -26 days +20:12:53.839997   4.0 4.0 packages/react-devtools-shared/src/__tests__/componentStacks-test.js    0.0 
  8   29  73ffce1b6   Thu Jun 24 22:42:44 2021 -0400  2021-06-25 02:42:44+00:00   Brian Vaughn    DevTools: Update tests to fix warnings/errors (#21748)  Some new ones had slipped in (e.g. deprecated ReactDOM.render message from 18)  -26 days +20:12:53.839997   12.0    12.0    packages/react-devtools-shared/src/__tests__/console-test.js    0.0 
  9   30  73ffce1b6   Thu Jun 24 22:42:44 2021 -0400  2021-06-25 02:42:44+00:00   Brian Vaughn    DevTools: Update tests to fix warnings/errors (#21748)  Some new ones had slipped in (e.g. deprecated ReactDOM.render message from 18)  -26 days +20:12:53.839997   7.0 6.0 packages/react-devtools-shared/src/__tests__/editing-test.js    1.0 
  10  31  73ffce1b6   Thu Jun 24 22:42:44 2021 -0400  2021-06-25 02:42:44+00:00   Brian Vaughn    DevTools: Update tests to fix warnings/errors (#21748)  Some new ones had slipped in (e.g. deprecated ReactDOM.render message from 18)  -26 days +20:12:53.839997   47.0    42.0    packages/react-devtools-shared/src/__tests__/inspectedElement-test.js   5.0 
  11  32  73ffce1b6   Thu Jun 24 22:42:44 2021 -0400  2021-06-25 02:42:44+00:00   Brian Vaughn    DevTools: Update tests to fix warnings/errors (#21748)  Some new ones had slipped in (e.g. deprecated ReactDOM.render message from 18)  -26 days +20:12:53.839997   7.0 6.0 packages/react-devtools-shared/src/__tests__/ownersListContext-test.js  1.0 
  12  33  73ffce1b6   Thu Jun 24 22:42:44 2021 -0400  2021-06-25 02:42:44+00:00   Brian Vaughn    DevTools: Update tests to fix warnings/errors (#21748)  Some new ones had slipped in (e.g. deprecated ReactDOM.render message from 18)  -26 days +20:12:53.839997   22.0    21.0    packages/react-devtools-shared/src/__tests__/profilerContext-test.js    1.0 
  13  34  73ffce1b6   Thu Jun 24 22:42:44 2021 -0400  2021-06-25 02:42:44+00:00   Brian Vaughn    DevTools: Update tests to fix warnings/errors (#21748)  Some new ones had slipped in (e.g. deprecated ReactDOM.render message from 18)  -26 days +20:12:53.839997   9.0 6.0 packages/react-devtools-shared/src/__tests__/profilerStore-test.js  3.0 
  14  35  73ffce1b6   Thu Jun 24 22:42:44 2021 -0400  2021-06-25 02:42:44+00:00   Brian Vaughn    DevTools: Update tests to fix warnings/errors (#21748)  Some new ones had slipped in (e.g. deprecated ReactDOM.render message from 18)  -26 days +20:12:53.839997   27.0    24.0    packages/react-devtools-shared/src/__tests__/profilingCache-test.js 3.0 
  15  36  73ffce1b6   Thu Jun 24 22:42:44 2021 -0400  2021-06-25 02:42:44+00:00   Brian Vaughn    DevTools: Update tests to fix warnings/errors (#21748)  Some new ones had slipped in (e.g. deprecated ReactDOM.render message from 18)  -26 days +20:12:53.839997   7.0 6.0 packages/react-devtools-shared/src/__tests__/profilingCharts-test.js    1.0 
  16  37  73ffce1b6   Thu Jun 24 22:42:44 2021 -0400  2021-06-25 02:42:44+00:00   Brian Vaughn    DevTools: Update tests to fix warnings/errors (#21748)  Some new ones had slipped in (e.g. deprecated ReactDOM.render message from 18)  -26 days +20:12:53.839997   12.0    19.0    packages/react-devtools-shared/src/__tests__/profilingCommitTreeBuilder-test.js -7.0    
  17  38  73ffce1b6   Thu Jun 24 22:42:44 2021 -0400  2021-06-25 02:42:44+00:00   Brian Vaughn    DevTools: Update tests to fix warnings/errors (#21748)  Some new ones had slipped in (e.g. deprecated ReactDOM.render message from 18)  -26 days +20:12:53.839997   4.0 2.0 packages/react-devtools-shared/src/__tests__/profilingHostRoot-test.js  2.0 
  </code></pre>