title: Use center in pandas rolling when using a time-series
body: <p>I am trying to set center=True in pandas rolling function, for a time-series:</p>
  
  <pre><code>import pandas as pd
  series = pd.Series(1, index = pd.date_range('2014-01-01', '2014-04-01', freq = 'D'))
  series.rolling('7D', min_periods=1, center=True, closed='left')
  </code></pre>
  
  <p>But output is:</p>
  
  <pre><code>---------------------------------------------------------------------------
  NotImplementedError                       Traceback (most recent call last)
  &lt;ipython-input-6-6b30c16a2d12&gt; in &lt;module&gt;()
        1 import pandas as pd
        2 series = pd.Series(1, index = pd.date_range('2014-01-01', '2014-04-01', freq = 'D'))
  ----&gt; 3 series.rolling('7D', min_periods=1, center=True, closed='left')
  
  ~\Anaconda3\lib\site-packages\pandas\core\generic.py in rolling(self, window, min_periods, freq, center, win_type, on, axis, closed)
     6193                                    min_periods=min_periods, freq=freq,
     6194                                    center=center, win_type=win_type,
  -&gt; 6195                                    on=on, axis=axis, closed=closed)
     6196 
     6197         cls.rolling = rolling
  
  ~\Anaconda3\lib\site-packages\pandas\core\window.py in rolling(obj, win_type, **kwds)
     2050         return Window(obj, win_type=win_type, **kwds)
     2051 
  -&gt; 2052     return Rolling(obj, **kwds)
     2053 
     2054 
  
  ~\Anaconda3\lib\site-packages\pandas\core\window.py in __init__(self, obj, window, min_periods, freq, center, win_type, axis, on, closed, **kwargs)
       84         self.win_freq = None
       85         self.axis = obj._get_axis_number(axis) if axis is not None else None
  ---&gt; 86         self.validate()
       87 
       88     @property
  
  ~\Anaconda3\lib\site-packages\pandas\core\window.py in validate(self)
     1090             # we don't allow center
     1091             if self.center:
  -&gt; 1092                 raise NotImplementedError("center is not implemented "
     1093                                           "for datetimelike and offset "
     1094                                           "based windows")
  
  NotImplementedError: center is not implemented for datetimelike and offset based windows
  </code></pre>
  
  <p>Expected output is the one generated by:</p>
  
  <pre><code>import pandas as pd
  series = pd.Series(1, index = pd.date_range('2014-01-01', '2014-04-01', freq = 'D'))
  series.rolling(7, min_periods=1, center=True).sum().head(10)
  
  2014-01-01    4.0
  2014-01-02    5.0
  2014-01-03    6.0
  2014-01-04    7.0
  2014-01-05    7.0
  2014-01-06    7.0
  2014-01-07    7.0
  2014-01-08    7.0
  2014-01-09    7.0
  2014-01-10    7.0
  Freq: D, dtype: float64
  </code></pre>
  
  <p>But using datetime like offsets, since it simplifies part of my other code (not posted here).</p>
  
  <p>Is there any alternative solution?</p>
  
  <p>Thanks</p>