SparseSeries.array only returns non-fills · Issue #14167 · pandas-dev/pandas (original) (raw)
Code Sample, a copy-pastable example if possible
np.array(pd.SparseSeries([0, 1], fill_value=0)) array([1])
Expected Output
array([0, 1])
this should really be consistent with Series
rather than just returning the non-fill values (i.e. rather than being equivalent to np.array(ps.SparseArray([np.nan, 1]))
.
output of pd.show_versions()
Pandas 0.18.1
should alone be relevant.
Apologies I've not checked if this is fixed in master. Just passing on issues from
scikit-learn/scikit-learn#7352.