Closed
Description
SparseSeries.shape
seems to return incorrect result ignoring shapes filled by fill_value
.
s = pd.SparseSeries([0, 0, 1, 0], fill_value=0)
s
#0 0
#1 0
#2 1
#3 0
# dtype: int64
# BlockIndex
# Block locations: array([2], dtype=int32)
# Block lengths: array([1], dtype=int32)
len(s)
#4
# must be (4, )?
s.shape
# (1,)
# OK
s._data.shape
# (4,)