title: Moving average for the last row of a data frame
body: <p>I have a data frame with two prices and moving average(window=3) for each price:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>price1</th>
  <th>price2</th>
  <th>MA3-price1</th>
  <th>MA3-price2</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>18</td>
  <td>10</td>
  <td></td>
  <td></td>
  </tr>
  <tr>
  <td>12</td>
  <td>9</td>
  <td></td>
  <td></td>
  </tr>
  <tr>
  <td>20</td>
  <td>15</td>
  <td>16.66</td>
  <td>11.33</td>
  </tr>
  <tr>
  <td>12</td>
  <td>7</td>
  <td>14.66</td>
  <td>10.33</td>
  </tr>
  <tr>
  <td>4</td>
  <td>9</td>
  <td>12</td>
  <td>10.33</td>
  </tr>
  <tr>
  <td>6</td>
  <td>4</td>
  <td>NaN</td>
  <td>NaN</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I don't have the MA for the last row. How can I calculate the MA for the last row and get:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>price1</th>
  <th>price2</th>
  <th>MA3-price1</th>
  <th>MA3-price2</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>18</td>
  <td>10</td>
  <td></td>
  <td></td>
  </tr>
  <tr>
  <td>12</td>
  <td>9</td>
  <td></td>
  <td></td>
  </tr>
  <tr>
  <td>20</td>
  <td>15</td>
  <td>16.66</td>
  <td>11.33</td>
  </tr>
  <tr>
  <td>12</td>
  <td>7</td>
  <td>14.66</td>
  <td>10.33</td>
  </tr>
  <tr>
  <td>4</td>
  <td>9</td>
  <td>12</td>
  <td>10.33</td>
  </tr>
  <tr>
  <td>6</td>
  <td>4</td>
  <td>7.33</td>
  <td>6.66</td>
  </tr>
  </tbody>
  </table>
  </div>