def get_dtype_counts(self):
        """Get the counts of dtypes in this object.

        Returns:
            The counts of dtypes in this object.
        """
        if hasattr(self, "dtype"):
            return pandas.Series({str(self.dtype): 1})
        result = self.dtypes.value_counts()
        result.index = result.index.map(lambda x: str(x))
        return result