Deprecate Series.ftype / DataFrame.ftypes · Issue #26705 · pandas-dev/pandas (original) (raw)
With the ftype(s)
property, you could check if data was sparse:
In [26]: df = pd.DataFrame({'a': pd.SparseArray([1, np.nan, 1])})
In [27]: df
Out[27]:
a
0 1.0
1 NaN
2 1.0
In [28]: df.dtypes
Out[28]:
a Sparse[float64, nan]
dtype: object
In [29]: df.ftypes
Out[29]:
a float64:sparse
dtype: object
But now that the dtype itself is a EA SparseDtype, I don't think those ftype
and ftypes
attributes serve any good purpose. So let's deprecate them.