class_docstr: Convert a pandas DataFrame to a suitable VW format.
  Instances of this class are built with classes such as SimpleLabel,
  MulticlassLabel, Feature or Namespace.
  
  The class also provided a convenience constructor to initialize the class
  based on the target/features column names only.
class_docstr_tok: ["Convert","a","pandas","DataFrame","to","a","suitable","VW","format",".","Instances","of","this","class","are","built","with","classes","such","as","SimpleLabel",",","MulticlassLabel",",","Feature","or","Namespace",".","The","class","also","provided","a","convenience","constructor","to","initialize","the","class","based","on","the","target\/features","column","names","only","."]
docstr: Check the columns type and values of a given instance.
  The method iterate through the attributes and look for _Col type
  attribute. Once found, the method use the _Col methods to check the
  type and the value range of the column. Also, the instance type in
  which the errors occur are prepend to the error message to be more
  explicit about where the error occurs in the formula.
  
  Raises:
      TypeError: If a column is not of valid type.
      ValueError: If a column values are not in the valid range.
docstr_tok: ["Check","the","columns","type","and","values","of","a","given","instance",".","The","method","iterate","through","the","attributes","and","look","for","_Col","type","attribute",".","Once","found",",","the","method","use","the","_Col","methods","to","check","the","type","and","the","value","range","of","the","column",".","Also",",","the","instance","type","in","which","the","errors","occur","are","prepend","to","the","error","message","to","be","more","explicit","about","where","the","error","occurs","in","the","formula",".","Raises",":","TypeError",":","If","a","column","is","not","of","valid","type",".","ValueError",":","If","a","column","values","are","not","in","the","valid","range","."]
code: def check_instance_columns(self, instance):
      """Check the columns type and values of a given instance.
      The method iterate through the attributes and look for _Col type
      attribute. Once found, the method use the _Col methods to check the
      type and the value range of the column. Also, the instance type in
      which the errors occur are prepend to the error message to be more
      explicit about where the error occurs in the formula.
  
      Raises:
          TypeError: If a column is not of valid type.
          ValueError: If a column values are not in the valid range.
      """
      class_name = type(instance).__name__
  
      for attribute_name, attribute_value in vars(instance).items():
          if not isinstance(attribute_value, list):
              attribute_value = [attribute_value]
  
          if not all([isinstance(x, _Col) for x in attribute_value]):
              continue
  
          # Testing columns type
          try:
              [x.check_col_type(self.df) for x in attribute_value]
          except TypeError as type_error:
              type_error_msg = "In argument '{attribute}' of '{class_name}', {error}".format(
                  class_name=class_name,
                  attribute=attribute_name,
                  error=str(type_error),
              )
              raise TypeError(type_error_msg)
  
          # Testing columns value range
          try:
              [x.check_col_value(self.df) for x in attribute_value]
          except ValueError as value_error:
              value_error_msg = "In argument '{attribute}' of '{class_name}', {error}".format(
                  class_name=class_name,
                  attribute=attribute_name,
                  error=str(value_error),
              )
              raise ValueError(value_error_msg)
  
imports: import warnings
  import numpy
  import pandas
  from typing import Any, Hashable, List, Optional, Tuple, Type, Union
label_desc: Use image node_id 11 for calling the DFtoVW obj's underlying member method code with example usage: obj.check_instance_columns(instance) without return types