title: pandas: Get an average value of sales for a day of week based on 4 past weeks
body: <p>I'm stacked, and I need the wisdom of the stackoverflow. </p>
  
  <p>I want to create a simple averaging model for sales based on the day of the week from past using pandas. </p>
  
  <p>I mean, the model predicts value of <em>Sales</em> for next Monday based on the last 4 Mondays. Also, if there are no enough weeks in the past, just make an average of existing weeks.</p>
  
  <p>Sample of my time-series df:</p>
  
  <pre><code>     weekDay weekNum Sales 
  Date            
  2013-01-01  2   1   22    
  2013-01-02  3   1   33    
  2013-01-03  4   1   44    
  2013-01-04  5   1   55    
  2013-01-05  6   1   66    
  2013-01-06  7   2   76    
  2013-01-07  1   2   23    
  2013-01-08  2   2   55    
  2013-01-09  3   2   34    
  2013-01-10  4   2   43    
  2013-01-11  5   2   34    
  2013-01-12  6   2   53    
  2013-01-13  7   3   52    
  2013-01-14  1   3   41    
  2013-01-15  2   3   31    
  2013-01-16  3   3   31    
  2013-01-17  4   3   42    
  2013-01-18  5   3   23    
  2013-01-19  6   3   41    
  2013-01-20  7   4   31    
  2013-01-21  1   4   31    
  2013-01-22  2   4   31    
  2013-01-23  3   4   43    
  2013-01-24  4   4   53    
  2013-01-25  5   4   32    
  2013-01-26  6   4   12    
  2013-01-27  7   5   41    
  2013-01-28  1   5   41    
  2013-01-29  2   5   12    
  2013-01-30  3   5   76    
  2013-01-31  4   5   43    
  2013-02-01  5   5   32    
  2013-02-02  6   5   54    
  2013-02-03  7   6   43    
  2013-02-04  1   6   43    
  2013-02-05  2   6   12    
  2013-02-06  3   6   12    
  2013-02-07  4   6   43    
  2013-02-08  5   6   22    
  2013-02-09  6   6   12    
  </code></pre>
  
  <p>What I've tried:</p>
  
  <pre><code>ts.resample('D').rolling(28).mean()["Sales"]
  ts.resample('W-MON').rolling(1).mean()["Sales"]
  </code></pre>
  
  <p>but it didn't help. </p>