title: Python rolling mean starting on the next row
body: <p>I have results from a horse race and want to have the rolling win count for the start of each race. This is what I currently have:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Horse</th>
  <th>Position</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>A</td>
  <td>4</td>
  </tr>
  <tr>
  <td>A</td>
  <td>1</td>
  </tr>
  <tr>
  <td>A</td>
  <td>3</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>This is what I'm after</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Horse</th>
  <th>Position</th>
  <th>Wins</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>A</td>
  <td>4</td>
  <td>0</td>
  </tr>
  <tr>
  <td>A</td>
  <td>1</td>
  <td>0</td>
  </tr>
  <tr>
  <td>A</td>
  <td>3</td>
  <td>1</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>So when horse A started the second race it had 0 wins but when it started the third race is had 1 win</p>