code: def get_type_string(item):
      
      if isinstance(item, DataFrame):
          return "DataFrame"
      if isinstance(item, Index):
          return type(item).__name__
      if isinstance(item, Series):
          return "Series"
      found = re.findall(r"<(?:type|class) '(\S*)'>",
                         to_text_string(type(item)))
      if found:
          return found[0]
docs: Return type string of an object.