<h4 dir="auto">Code Sample, a copy-pastable example if possible</h4>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import numpy as np
import pandas as pd
import datetime

df = pd.DataFrame({'a': [1, np.nan, 5],
                   'datetime':pd.to_datetime(['20170403', '20170404', '20170405'])})
df.set_index('datetime', inplace=True)
df.rolling('2d', 1).apply(np.nanmin)"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span>
<span class="pl-k">import</span> <span class="pl-s1">pandas</span> <span class="pl-k">as</span> <span class="pl-s1">pd</span>
<span class="pl-k">import</span> <span class="pl-s1">datetime</span>

<span class="pl-s1">df</span> <span class="pl-c1">=</span> <span class="pl-s1">pd</span>.<span class="pl-v">DataFrame</span>({<span class="pl-s">'a'</span>: [<span class="pl-c1">1</span>, <span class="pl-s1">np</span>.<span class="pl-s1">nan</span>, <span class="pl-c1">5</span>],
                   <span class="pl-s">'datetime'</span>:<span class="pl-s1">pd</span>.<span class="pl-en">to_datetime</span>([<span class="pl-s">'20170403'</span>, <span class="pl-s">'20170404'</span>, <span class="pl-s">'20170405'</span>])})
<span class="pl-s1">df</span>.<span class="pl-en">set_index</span>(<span class="pl-s">'datetime'</span>, <span class="pl-s1">inplace</span><span class="pl-c1">=</span><span class="pl-c1">True</span>)
<span class="pl-s1">df</span>.<span class="pl-en">rolling</span>(<span class="pl-s">'2d'</span>, <span class="pl-c1">1</span>).<span class="pl-en">apply</span>(<span class="pl-s1">np</span>.<span class="pl-s1">nanmin</span>)</pre></div>
<h4 dir="auto">Problem description</h4>
<p dir="auto">the above generates</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="              a
datetime       
2017-04-03  1.0
2017-04-04  NaN
2017-04-05  5.0"><pre class="notranslate"><code class="notranslate">              a
datetime       
2017-04-03  1.0
2017-04-04  NaN
2017-04-05  5.0
</code></pre></div>
<p dir="auto">when use <code class="notranslate">datetimeIndex</code>, if a row has <code class="notranslate">NaN</code> value it is not fed to input of <code class="notranslate">apply</code> when creating output for that row. To illustrate this, I use:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="def foo(x):
    print(x)
    return np.nanmin(x)
print(df.rolling('2d', 1).apply(foo))"><pre class="notranslate"><code class="notranslate">def foo(x):
    print(x)
    return np.nanmin(x)
print(df.rolling('2d', 1).apply(foo))
</code></pre></div>
<p dir="auto">and got printed value:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[ 1.]
[ nan   5.]"><pre class="notranslate"><code class="notranslate">[ 1.]
[ nan   5.]
</code></pre></div>
<p dir="auto">the second row is skipped.<br>
This issue doesn't not exist when integer index is used:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="df = pd.DataFrame({'a': [1, np.nan, 5]})
def foo(x):
    print(x)
    return np.nanmin(x)
print(df.rolling(2, 1).apply(foo))"><pre class="notranslate"><code class="notranslate">df = pd.DataFrame({'a': [1, np.nan, 5]})
def foo(x):
    print(x)
    return np.nanmin(x)
print(df.rolling(2, 1).apply(foo))
</code></pre></div>
<p dir="auto">print the following:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[ 1.]
[  1.  nan]
[ nan   5.]"><pre class="notranslate"><code class="notranslate">[ 1.]
[  1.  nan]
[ nan   5.]
</code></pre></div>
<p dir="auto">and yields correct results</p>
<h4 dir="auto">Expected Output</h4>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="              a
datetime       
2017-04-03  1.0
2017-04-04  1.0
2017-04-05  5.0"><pre class="notranslate"><code class="notranslate">              a
datetime       
2017-04-03  1.0
2017-04-04  1.0
2017-04-05  5.0
</code></pre></div>
<h4 dir="auto">Output of <code class="notranslate">pd.show_versions()</code></h4>
<details>
INSTALLED VERSIONS
<hr>
<p dir="auto">commit: None<br>
python: 3.5.2.final.0<br>
python-bits: 64<br>
OS: Darwin<br>
OS-release: 15.6.0<br>
machine: x86_64<br>
processor: i386<br>
byteorder: little<br>
LC_ALL: None<br>
LANG: None<br>
LOCALE: en_US.UTF-8</p>
<p dir="auto">pandas: 0.20.3<br>
pytest: 2.8.5<br>
pip: 8.1.2<br>
setuptools: 25.1.6<br>
Cython: 0.23.4<br>
numpy: 1.13.1<br>
scipy: 0.17.0<br>
xarray: None<br>
IPython: 5.1.0<br>
sphinx: 1.4.1<br>
patsy: 0.4.0<br>
dateutil: 2.6.1<br>
pytz: 2017.2<br>
blosc: None<br>
bottleneck: 1.0.0<br>
tables: 3.2.2<br>
numexpr: 2.4.6<br>
feather: None<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.5.0<br>
bs4: 4.4.1<br>
html5lib: None<br>
sqlalchemy: 1.0.11<br>
pymysql: None<br>
psycopg2: None<br>
jinja2: 2.8<br>
s3fs: None<br>
pandas_gbq: None<br>
pandas_datareader: None</p>
</details>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="24256738" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/5694" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/5694/hovercard" href="https://github.com/pandas-dev/pandas/issues/5694">#5694</a></li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="df = pd.DataFrame([0], index=[datetime(2012, 11, 4, 23, 0, 0)])
df = df.tz_localize('America/New_York')
df.resample(rule='D', how='sum')"><pre class="notranslate"><code class="notranslate">df = pd.DataFrame([0], index=[datetime(2012, 11, 4, 23, 0, 0)])
df = df.tz_localize('America/New_York')
df.resample(rule='D', how='sum')
</code></pre></div>
<p dir="auto">raises a AmbiguousTimeError even though datetime(2012, 11, 4, 23, 0, 0) is not ambiguous.</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="46499065" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/8601" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/8601/hovercard" href="https://github.com/pandas-dev/pandas/issues/8601">#8601</a></li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="idx = date_range('2014-10-08 00:00','2014-10-09 00:00', freq='D', tz='Europe/Berlin')
pd.Series(5, idx).resample('MS')"><pre class="notranslate"><code class="notranslate">idx = date_range('2014-10-08 00:00','2014-10-09 00:00', freq='D', tz='Europe/Berlin')
pd.Series(5, idx).resample('MS')
</code></pre></div>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="47932953" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/8744" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/8744/hovercard" href="https://github.com/pandas-dev/pandas/issues/8744">#8744</a></li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="index = pd.to_datetime(pd.Series([
'2014-10-26 07:35:49',
'2014-10-26 07:45:08',
'2014-10-26 08:04:58'
]))

df = pd.DataFrame(np.arange(len(index)), index=index)
df = df.tz_localize('Asia/Krasnoyarsk', ambiguous='NaT')
df.resample('D')

AmbiguousTimeError: Cannot infer dst time from Timestamp('2014-10-26 01:00:00'), try using the 'ambiguous' argument"><pre class="notranslate"><code class="notranslate">index = pd.to_datetime(pd.Series([
'2014-10-26 07:35:49',
'2014-10-26 07:45:08',
'2014-10-26 08:04:58'
]))

df = pd.DataFrame(np.arange(len(index)), index=index)
df = df.tz_localize('Asia/Krasnoyarsk', ambiguous='NaT')
df.resample('D')

AmbiguousTimeError: Cannot infer dst time from Timestamp('2014-10-26 01:00:00'), try using the 'ambiguous' argument
</code></pre></div>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked="">  <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="46928851" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/8653" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/8653/hovercard" href="https://github.com/pandas-dev/pandas/issues/8653">#8653</a> (might be separate issue)</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import datetime
import pytz as tz
import pandas as pd

rome = tz.timezone('Europe/Rome')

dr = []
for i in range(2):
    dp = datetime.datetime(2014, 10, 25) + datetime.timedelta(days=i)
    dr.append(rome.localize(dp))

series = {}
for i, ddr in enumerate(dr):
    series[ddr] = i * 10

s1 = pd.Series(series)
s1 = s1.resample('D', how='mean')"><pre class="notranslate"><code class="notranslate">import datetime
import pytz as tz
import pandas as pd

rome = tz.timezone('Europe/Rome')

dr = []
for i in range(2):
    dp = datetime.datetime(2014, 10, 25) + datetime.timedelta(days=i)
    dr.append(rome.localize(dp))

series = {}
for i, ddr in enumerate(dr):
    series[ddr] = i * 10

s1 = pd.Series(series)
s1 = s1.resample('D', how='mean')
</code></pre></div>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="52580498" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/9119" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/9119/hovercard" href="https://github.com/pandas-dev/pandas/issues/9119">#9119</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="53118626" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/9173" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/9173/hovercard" href="https://github.com/pandas-dev/pandas/issues/9173">#9173</a></li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="57368417" data-permission-text="Title is private" data-url="https://github.com/pandas-dev/pandas/issues/9468" data-hovercard-type="issue" data-hovercard-url="/pandas-dev/pandas/issues/9468/hovercard" href="https://github.com/pandas-dev/pandas/issues/9468">#9468</a></li>
</ul>