In [2]:
dft = pd.DataFrame(
    {
        "str1": "foo",
        "str2": pd.Series(["bar"] * 3).astype("string"),
        "str3": pd.Series(["qux"] * 3).astype("category"),
        "float64": np.random.RandomState(64).rand(3),
        "int64": 1,
        "float32": np.random.RandomState(32).rand(3).astype("float32"),
        "int8": pd.Series([1] * 3, dtype="int8"),
        "bool": False,
        "date1": pd.Timestamp("20010102"),
        "date2": pd.date_range("1/1/2015", periods=3),
        "date3": np.datetime64('2011-06-24'),
        "delta": [pd.Timedelta(days=i) for i in range(3)]
    }
)
dft
Out[2]:
str1 str2 str3 float64 int64 float32 int8 bool date1 date2 date3 delta
0 foo bar qux 0.379099 1 0.858889 1 False 2001-01-02 2015-01-01 2011-06-24 0 days
1 foo bar qux 0.567098 1 0.372711 1 False 2001-01-02 2015-01-02 2011-06-24 1 days
2 foo bar qux 0.595593 1 0.555129 1 False 2001-01-02 2015-01-03 2011-06-24 2 days

Display each column along with its data type.

In [3]:
dft.dtypes
Out[3]:
str1                object
str2                string
str3              category
float64            float64
int64                int64
float32            float32
int8                  int8
bool                  bool
date1       datetime64[ns]
date2       datetime64[ns]
date3       datetime64[ns]
delta      timedelta64[ns]
dtype: object

Return the column count of each data type.

In [4]:
dft.dtypes.value_counts()
Out[4]:
datetime64[ns]     3
object             1
category           1
int64              1
timedelta64[ns]    1
int8               1
float32            1
float64            1
string             1
bool               1
dtype: int64