title: Pandas Apply Values Based On Grouping Field
body: <p>I have a data frame that looks like:</p>
  
  <pre><code>time    action    value
  10:00   FG2       2
  10:00   Assist    0
  09:45   Turnover  -1
  09:45   Steal     0
  09:30   FG3       3
  09:20   Miss      0
  </code></pre>
  
  <p>How can SUM up the value column per <code>time</code> and apply it to other rows that share the same <code>time</code> value? In this example, the <code>value</code> for the second row would be 2, since it shares the same <code>time</code> as row one.</p>
  
  <p>Expected output would be:</p>
  
  <pre><code>10:00   FG2          2
  10:00   Assist       2
  09:45   Turnover     -1
  09:45   Steal        -1
  09:30   FG3          3
  09:20   Miss         0
  
  </code></pre>
  
  <p>The way I would approach it now would be to create a grouped data frame with MAX <code>value</code> by <code>time</code> and then JOIN back to the original data frame on <code>time</code>, but this is SQL/RDBMS-type thinking, and I'm wondering if there is a more efficient way to do this through Python?</p>
  
  <p>For example, in T-SQL, I would write this as <code>SUM(value) OVER (PARTITION BY time)</code></p>