You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In [116]: df = pandas.DataFrame([[1,2], [3,4], [numpy.nan,numpy.nan], [7,8], [9,10]], columns=['a', 'b'], index=[100.0, 101.0, numpy.nan, 102.0, 103.0])
In [117]: print df
--------> print(df)
a b
100.0 1 2
101.0 3 4
nan NaN NaN
102.0 7 8
103.0 9 10
#referencing anything after the nan in the index results in getting nans!
In [118]: df.reindex(index=[101.0, 102.0, 103.0])
Out[118]:
a b
101.0 3 4
102.0 NaN NaN
103.0 NaN NaN
#after nan = NaN again!
In [119]: df.reindex(index=[103.0])
Out[119]:
a b
103.0 NaN NaN
#before nan looks good though
In [120]: df.reindex(index=[101.0])
Out[119]:
a b
101.0 3 4
The text was updated successfully, but these errors were encountered:
from user report
The text was updated successfully, but these errors were encountered: