pydata/pandas — pull request #8108 by behzadnouri (2014-08-25 02:48:37+00:00)
Title: BUG: reindexing a frame fails to pick nan values

currently

>>> df = pd.DataFrame([[1, 2], [3, 5], [7, 11], [9, 23]],
... index=[2, np.nan, 1, 5], columns=['joe', 'jim'])
>>> df
joe jim
2 1 2
NaN 3 5
1 7 11
5 9 23
>>> df.reindex([2, np.nan, 1])
joe jim
2 1 2
NaN NaN NaN
1 7 11
with this patch:

>>> df.reindex([2, np.nan, 1])
joe jim
2 1 2
NaN 3 5
1 7 11
>>> df.reindex([np.nan, 5, 5, np.nan, 1, 2, np.nan])
joe jim
NaN 3 5
5 9 23
5 9 23
NaN 3 5
1 7 11
2 1 2
NaN 3 5