title: Why does pandas roll a week forward when using resample with W-MON frequency?
body: <p>As example, I have the following code which creates a dataframe with an index containing a single value - the date '2018-03-06' (a Tuesday).  Note that this date falls in the week of 2018-03-05 (a Monday):</p>
  
  <pre><code>values = [1, 1, 1]
  dates = pd.to_datetime(np.repeat('2018-03-06', 3))
  df = pd.DataFrame({
      'value': values
  }, index=dates)
  df.resample('W-MON').size()
  </code></pre>
  
  <p>which produces:</p>
  
  <pre><code>2018-03-12    3
  Freq: W-MON, dtype: int64
  </code></pre>
  
  <p>Why does pandas roll the date forward one week?  I would have expected the result to have been resampled to 2018-03-05 since that is the week during which the values were generated and I'm using <code>freq='W-MON'</code>.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>As was pointed out, I needed to add the <code>label</code> argument to <code>resample</code> which defines which bin edge to use.  Using <code>label='left'</code> solves the problem of bucketing the dates in the correct week except when the date falls on the start of the week (in this case, Monday).  For example, if I apply resample to the date 2018-03-05 using <code>label='left'</code> then the resampled value is 2018-02-26 when it should be 2018-03-05.</p>