<h4 dir="auto">Code Sample, a copy-pastable example if possible</h4>
<p dir="auto">import pandas as pd</p>
<p dir="auto">In [1]: df = pd.DataFrame([1,1,1,1])</p>
<p dir="auto">In [2]: pd.rolling_window(df, window=[1,1], mean=False)<br>
C:\Users\login\AppData\Local\Continuum\Anaconda3\lib\site-packages\spyderlib\widgets\externalshell\start_ipython_kernel.py:1: FutureWarning: pd.rolling_sum is deprecated for DataFrame and will be removed in a future version, replace with<br>
DataFrame.rolling(window=[1, 1],center=False,axis=0).sum()</p>
<h1 dir="auto">-<em>- coding: utf-8 -</em>-</h1>
<p dir="auto">Traceback (most recent call last):</p>
<p dir="auto">File "", line 1, in <br>
pd.rolling_window(pd.DataFrame([1,1,1,1]), window=[1,1], mean=False)</p>
<p dir="auto">File "C:\Users\login\AppData\Local\Continuum\Anaconda3\lib\site-packages\pandas\stats\moments.py", line 657, in rolling_window<br>
**kwargs)</p>
<p dir="auto">File "C:\Users\login\AppData\Local\Continuum\Anaconda3\lib\site-packages\pandas\stats\moments.py", line 240, in ensure_compat<br>
result = getattr(r, name)(_args, *_kwds)</p>
<p dir="auto">File "C:\Users\login\AppData\Local\Continuum\Anaconda3\lib\site-packages\pandas\core\window.py", line 789, in sum<br>
return super(Rolling, self).sum(**kwargs)</p>
<p dir="auto">File "C:\Users\login\AppData\Local\Continuum\Anaconda3\lib\site-packages\pandas\core\window.py", line 552, in sum<br>
return self._apply('roll_sum', **kwargs)</p>
<p dir="auto">File "C:\Users\login\AppData\Local\Continuum\Anaconda3\lib\site-packages\pandas\core\window.py", line 487, in _apply<br>
result = np.apply_along_axis(calc, self.axis, values)</p>
<p dir="auto">File "C:\Users\login\AppData\Local\Continuum\Anaconda3\lib\site-packages\numpy\lib\shape_base.py", line 91, in apply_along_axis<br>
res = func1d(arr[tuple(i.tolist())], _args, *_kwargs)</p>
<p dir="auto">File "C:\Users\login\AppData\Local\Continuum\Anaconda3\lib\site-packages\pandas\core\window.py", line 484, in calc<br>
return func(x, window, min_periods=self.min_periods)</p>
<p dir="auto">File "C:\Users\login\AppData\Local\Continuum\Anaconda3\lib\site-packages\pandas\core\window.py", line 471, in func<br>
window, minp, **kwargs)</p>
<p dir="auto">File "pandas\algos.pyx", line 901, in pandas.algos.roll_sum (pandas\algos.c:28213)</p>
<p dir="auto">TypeError: an integer is required</p>
<p dir="auto">In [3]: df.rolling(window=[1, 1],center=False,axis=0).sum()<br>
Traceback (most recent call last):</p>
<p dir="auto">File "", line 1, in <br>
df.rolling(window=[1, 1],center=False,axis=0).sum()</p>
<p dir="auto">File "C:\Users\login\AppData\Local\Continuum\Anaconda3\lib\site-packages\pandas\core\window.py", line 789, in sum<br>
return super(Rolling, self).sum(**kwargs)</p>
<p dir="auto">File "C:\Users\login\AppData\Local\Continuum\Anaconda3\lib\site-packages\pandas\core\window.py", line 552, in sum<br>
return self._apply('roll_sum', **kwargs)</p>
<p dir="auto">File "C:\Users\login\AppData\Local\Continuum\Anaconda3\lib\site-packages\pandas\core\window.py", line 487, in _apply<br>
result = np.apply_along_axis(calc, self.axis, values)</p>
<p dir="auto">File "C:\Users\login\AppData\Local\Continuum\Anaconda3\lib\site-packages\numpy\lib\shape_base.py", line 91, in apply_along_axis<br>
res = func1d(arr[tuple(i.tolist())], _args, *_kwargs)</p>
<p dir="auto">File "C:\Users\login\AppData\Local\Continuum\Anaconda3\lib\site-packages\pandas\core\window.py", line 484, in calc<br>
return func(x, window, min_periods=self.min_periods)</p>
<p dir="auto">File "C:\Users\login\AppData\Local\Continuum\Anaconda3\lib\site-packages\pandas\core\window.py", line 471, in func<br>
window, minp, **kwargs)</p>
<p dir="auto">File "pandas\algos.pyx", line 901, in pandas.algos.roll_sum (pandas\algos.c:28213)</p>
<p dir="auto">TypeError: an integer is required</p>
<h4 dir="auto">Expected Output</h4>
<p dir="auto">[NA, 2, 2, 2]</p>
<h4 dir="auto">output of <code class="notranslate">pd.show_versions()</code></h4>
<h2 dir="auto">INSTALLED VERSIONS</h2>
<p dir="auto">commit: None<br>
python: 3.5.1.final.0<br>
python-bits: 64<br>
OS: Windows<br>
OS-release: 7<br>
machine: AMD64<br>
processor: Intel64 Family 6 Model 26 Stepping 5, GenuineIntel<br>
byteorder: little<br>
LC_ALL: None<br>
LANG: en_US</p>
<p dir="auto">pandas: 0.18.0<br>
nose: 1.3.7<br>
pip: 8.1.1<br>
setuptools: 20.3<br>
Cython: 0.23.4<br>
numpy: 1.10.4<br>
scipy: 0.17.0<br>
statsmodels: 0.6.1<br>
xarray: None<br>
IPython: 4.1.2<br>
sphinx: 1.3.1<br>
patsy: 0.4.0<br>
dateutil: 2.5.1<br>
pytz: 2016.2<br>
blosc: None<br>
bottleneck: 1.0.0<br>
tables: 3.2.2<br>
numexpr: 2.5<br>
matplotlib: 1.5.1<br>
openpyxl: 2.3.2<br>
xlrd: 0.9.4<br>
xlwt: 1.0.0<br>
xlsxwriter: 0.8.4<br>
lxml: 3.6.0<br>
bs4: 4.4.1<br>
html5lib: None<br>
httplib2: None<br>
apiclient: None<br>
sqlalchemy: 1.0.12<br>
pymysql: None<br>
psycopg2: None<br>
jinja2: 2.8<br>
boto: 2.39.0</p>
<p dir="auto">xref <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="145203446" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/12765" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/12765/hovercard" href="https://github.com/pandas-dev/pandas/issues/12765">#12765</a>. Let's pick up this as a test case and give a more meaningful error message. e.g. for <code class="notranslate">Window</code> the <code class="notranslate">win_type</code> is missing, so this should be the error.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [15]: pd.DataFrame(np.arange(10)).rolling(2., center=True).median()
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
&lt;ipython-input-15-73c4e557093d&gt; in &lt;module&gt;()
----&gt; 1 pd.DataFrame(np.arange(10)).rolling(2., center=True).median()

/usr/lib/python3.5/site-packages/pandas/core/window.py in median(self, **kwargs)
    811     @Appender(_shared_docs['median'])
    812     def median(self, **kwargs):
--&gt; 813         return super(Rolling, self).median(**kwargs)
    814 
    815     @Substitution(name='rolling')

/usr/lib/python3.5/site-packages/pandas/core/window.py in median(self, how, **kwargs)
    592         if self.freq is not None and how is None:
    593             how = 'median'
--&gt; 594         return self._apply('roll_median_c', how=how, **kwargs)
    595 
    596     _shared_docs['std'] = dedent(&quot;&quot;&quot;

/usr/lib/python3.5/site-packages/pandas/core/window.py in _apply(self, func, window, center, check_minp, how, **kwargs)
    473             # calculation function
    474             if center:
--&gt; 475                 offset = _offset(window, center)
    476                 additional_nans = np.array([np.NaN] * offset)
    477 

/usr/lib/python3.5/site-packages/pandas/core/window.py in _offset(window, center)
   1356 def _offset(window, center):
   1357     if not com.is_integer(window):
-&gt; 1358         window = len(window)
   1359     offset = (window - 1) / 2. if center else 0
   1360     try:

TypeError: object of type 'float' has no len()"><pre class="notranslate"><code class="notranslate">In [15]: pd.DataFrame(np.arange(10)).rolling(2., center=True).median()
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
&lt;ipython-input-15-73c4e557093d&gt; in &lt;module&gt;()
----&gt; 1 pd.DataFrame(np.arange(10)).rolling(2., center=True).median()

/usr/lib/python3.5/site-packages/pandas/core/window.py in median(self, **kwargs)
    811     @Appender(_shared_docs['median'])
    812     def median(self, **kwargs):
--&gt; 813         return super(Rolling, self).median(**kwargs)
    814 
    815     @Substitution(name='rolling')

/usr/lib/python3.5/site-packages/pandas/core/window.py in median(self, how, **kwargs)
    592         if self.freq is not None and how is None:
    593             how = 'median'
--&gt; 594         return self._apply('roll_median_c', how=how, **kwargs)
    595 
    596     _shared_docs['std'] = dedent("""

/usr/lib/python3.5/site-packages/pandas/core/window.py in _apply(self, func, window, center, check_minp, how, **kwargs)
    473             # calculation function
    474             if center:
--&gt; 475                 offset = _offset(window, center)
    476                 additional_nans = np.array([np.NaN] * offset)
    477 

/usr/lib/python3.5/site-packages/pandas/core/window.py in _offset(window, center)
   1356 def _offset(window, center):
   1357     if not com.is_integer(window):
-&gt; 1358         window = len(window)
   1359     offset = (window - 1) / 2. if center else 0
   1360     try:

TypeError: object of type 'float' has no len()
</code></pre></div>
<p dir="auto">Note that <code class="notranslate">pd.DataFrame(np.arange(10)).rolling(2.).median()</code> works fine.</p>
<p dir="auto">pandas 0.18.0.</p>