W3cubDocs

/pandas 0.25

pandas.Series.get_ftype_counts

Series.get_ftype_counts(self) [source]

Return counts of unique ftypes in this object.

Deprecated since version 0.23.0.

This is useful for SparseDataFrame or for DataFrames containing sparse arrays.

Returns:
dtype : Series

Series with the count of columns with each type and sparsity (dense/sparse).

See also

ftypes
Return ftypes (indication of sparse/dense and dtype) in this object.

Examples

>>> a = [['a', 1, 1.0], ['b', 2, 2.0], ['c', 3, 3.0]]
>>> df = pd.DataFrame(a, columns=['str', 'int', 'float'])
>>> df
  str  int  float
0   a    1    1.0
1   b    2    2.0
2   c    3    3.0
>>> df.get_ftype_counts()  # doctest: +SKIP
float64:dense    1
int64:dense      1
object:dense     1
dtype: int64

© 2008–2012, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/0.25.0/reference/api/pandas.Series.get_ftype_counts.html