class_docstr: In a TextSeries, every cell has to be a text, i.e. a string. For example,
  `pd.Series(["test", "test"])` is a valid TextSeries.
class_docstr_tok: ["In","a","TextSeries",",","every","cell","has","to","be","a","text",",","i.e",".","a","string",".","For","example",",","`","pd.Series","(","[","``","test","''",",","``","test","''","]",")","`","is","a","valid","TextSeries","."]
docstr: Check if a given Pandas Series has the properties of a TextSeries.
docstr_tok: ["Check","if","a","given","Pandas","Series","has","the","properties","of","a","TextSeries","."]
code: def check_type(s: pd.Series) -> Tuple[bool, str]:
      """
      Check if a given Pandas Series has the properties of a TextSeries.
      """
  
      error_string = (
          "should be TextSeries: the input Series should consist only of strings in every cell."
          " See help(hero.HeroTypes) for more information."
      )
  
      try:
          first_non_nan_value = s.loc[s.first_valid_index()]
          if not isinstance(first_non_nan_value, str):
              return False, error_string
      except KeyError:  # Only NaNs in Series -> same warning applies
          return False, error_string
  
      return True, ""
  
file_path: texthero/texthero/_types.py
imports: import functools
  import pandas
  from typing import Tuple
label_desc: Use image node_id 1 for calling the TextSeries obj's underlying member method code with example usage: obj.check_type(s) and returns: True,  str, False,  error_string, False,  error_string