title: Python/Pandas: For loop to sum moving range and append to new column
body: <p>I am fairly new to Python and Pandas so please forgive the uninformed question I'm posing here.</p>
  
  <p>I have a dataframe (QReport) that looks like so:</p>
  
  <pre><code>DATE            STATE       SALES
  2010-12-01       AL          10
  2010-12-02       AL          13
  2010-12-03       AL          16
  2010-12-04       AL          10
  2010-12-05       AL          10
  2010-12-06       AL          2
  2010-12-07       AL          5 
  2010-12-08       AL          5
  </code></pre>
  
  <p>I'd like to create a seven day sales total column that sums seven day slices of sales and adds that total to a new '7DTotal' column. I've been trying to get at this through a for loop, setting x and y variables as 0 (zero) and 6 indexes which I try to increment each run through the loop:</p>
  
  <pre><code>x = 0
  y = 6
  for i in QReport:
      QReport['7DTotal'] = sum(QReport['SALES'][x:y])
      x = x + 1
      y = y + 1
  </code></pre>
  
  <p>This approach, however, is not working and is returning the same value for every row in the newly-added 7DTotal column. </p>
  
  <p>Expected output would be:</p>
  
  <pre><code>DATE            STATE       SALES   7DTotal
  2010-12-01       AL          10        0
  2010-12-02       AL          13        0
  2010-12-03       AL          16        0
  2010-12-04       AL          10        0
  2010-12-05       AL          10        0
  2010-12-06       AL          2         0
  2010-12-07       AL          5         66
  2010-12-08       AL          5         61
  </code></pre>
  
  <p>Thanks in advance for any help!</p>