pandas.Panel.get_dtype_counts

Panel.get_dtype_counts() [source]

Return counts of unique dtypes in this object.

Returns:

dtype : Series

Series with the count of columns with each dtype.

See also

dtypes
Return the dtypes 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_dtype_counts()
float64    1
int64      1
object     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.23.4/generated/pandas.Panel.get_dtype_counts.html