class_docstr: In a VectorSeries, every cell is a vector representing text, i.e.
  a list of numbers.
  For example, `pd.Series([[1.0, 2.0], [3.0]])` is a valid VectorSeries.
class_docstr_tok: ["In","a","VectorSeries",",","every","cell","is","a","vector","representing","text",",","i.e",".","a","list","of","numbers",".","For","example",",","`","pd.Series","(","[","[","1.0",",","2.0","]",",","[","3.0","]","]",")","`","is","a","valid","VectorSeries","."]
docstr: Check if a given Pandas Series has the properties of a VectorSeries.
docstr_tok: ["Check","if","a","given","Pandas","Series","has","the","properties","of","a","VectorSeries","."]
code: def check_type(s: pd.Series, input_output="") -> Tuple[bool, str]:
      """
      Check if a given Pandas Series has the properties of a VectorSeries.
      """
  
      error_string = (
          "should be VectorSeries: there are non-representation cells (every cell should be a list of floats) in the given Series."
          " See help(hero.HeroTypes) for more information."
      )
  
      def is_numeric(x):
          try:
              float(x)
          except ValueError:
              return False
          else:
              return True
  
      def is_list_of_numbers(cell):
          return isinstance(cell, (list, tuple)) and all(
              is_numeric(x) for x in cell
          )
  
      try:
          first_non_nan_value = s.loc[s.first_valid_index()]
          if not is_list_of_numbers(first_non_nan_value):
              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 VectorSeries obj's underlying member method code with example usage: obj.check_type(s, input_output) and returns: True,  str, unknown, True, False,  error_string, False,  error_string, False