code: def validate_dataframe(array):
      """
      Validates all strings or numbers in each dataframe column
  
      :raises: (PlotlyError) If there are any two items in any list whose
          types differ
      """
      from numbers import Number
  
      for vector in array:
          if isinstance(vector[0], Number):
              if not all(isinstance(item, Number) for item in vector):
                  raise exceptions.PlotlyError(
                      "Error in dataframe. "
                      "Make sure all entries of "
                      "each column are either "
                      "numbers or strings."
                  )
          elif isinstance(vector[0], str):
              if not all(isinstance(item, str) for item in vector):
                  raise exceptions.PlotlyError(
                      "Error in dataframe. "
                      "Make sure all entries of "
                      "each column are either "
                      "numbers or strings."
                  )
  
file_path: plotly.py/packages/python/plotly/plotly/figure_factory/utils.py
imports: from collections.abc import Sequence
  from plotly import exceptions
  from plotly.colors import DEFAULT_PLOTLY_COLORS, PLOTLY_SCALES, color_parser, colorscale_to_colors, colorscale_to_scale, convert_to_RGB_255, find_intermediate_color, hex_to_rgb, label_rgb, n_colors, unconvert_from_RGB_255, unlabel_rgb, validate_colors, validate_colors_dict, validate_colorscale, validate_scale_values
label_desc: Use image node_id 3 for calling a global function with example usage: validate_dataframe(array) without return types