code: def get_ftype_counts(self):
          
          if hasattr(self, "ftype"):
              return pandas.Series({self.ftype: 1})
          return self.ftypes.value_counts().sort_index()
docs: Get the counts of ftypes in this object.
  
          Returns:
              The counts of ftypes in this object.