Closed
Description
In [1]: pd.__version__
Out[1]: '0.13.1'
In [2]: pd.DataFrame({'a': pd.SparseArray([1,2,3, np.nan, np.nan]), 'b': [1,2,3,np.nan,np.nan]})
Out[2]:
a b
0 1 1
1 2 2
2 3 3
3 NaN NaN
4 NaN NaN
[5 rows x 2 columns]
In [3]: _2.reindex(_2.index[1:], fill_value=10.)
Out[3]:
a b
1 2 2
2 3 3
3 10 NaN
4 10 NaN
[4 rows x 2 columns]
Also, this looks weird, I'd expect sparse array to preserve nans:
In [3]: pd.SparseArray([np.nan, np.nan], fill_value=0.0).to_dense()
Out[3]: array([ 0., 0.])