Series[sparse].to_sparse messes up length (original) (raw)

In [23]: a = pd.Series(pd.SparseArray([1, 2, None, 2]))

In [24]: b = a.to_sparse()

In [25]: len(a), len(b) Out[25]: (4, 3)

In [26]: b Out[26]: 0 1.0 1 2.0 2 2.0 3 dtype: float64 IntIndex Indices: array([0, 1, 2], dtype=int32)

Fixing in #22325, this is to link from the release notes.