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: Set namespaces attributes. Only one of namespaces or features should be passed when being called.
  
  Args:
      namespaces: The namespaces argument.
      features: The features argument.
  
  Raises:
      ValueError: If argument 'features' or 'namespaces' are not valid.
docstr_tok: ["Set","namespaces","attributes",".","Only","one","of","namespaces","or","features","should","be","passed","when","being","called",".","Args",":","namespaces",":","The","namespaces","argument",".","features",":","The","features","argument",".","Raises",":","ValueError",":","If","argument","'features","'","or","'namespaces","'","are","not","valid","."]
code: def set_namespaces(
      self,
      namespaces: Optional[Union[Namespace, List[Namespace]]],
      features: Optional[Union[Feature, List[Feature]]],
  ):
      """Set namespaces attributes. Only one of namespaces or features should be passed when being called.
  
      Args:
          namespaces: The namespaces argument.
          features: The features argument.
  
      Raises:
          ValueError: If argument 'features' or 'namespaces' are not valid.
      """
      if (features is None) and (namespaces is None):
          raise ValueError("Missing 'features' or 'namespace' argument")
      if (features is not None) and (namespaces is not None):
          raise ValueError(
              "Arguments supplied for both 'features' and 'namespaces', only one of the these arguments should be supplied."
          )
  
      if features is not None:
          namespaces = Namespace(features=features)
  
      namespaces = (
          list(namespaces)
          if isinstance(namespaces, (list, set))
          else [namespaces]
      )
  
      self.namespaces = namespaces
  
imports: import warnings
  import numpy
  import pandas
  from typing import Any, Hashable, List, Optional, Tuple, Type, Union
label_desc: Use image node_id 5 for calling the DFtoVW obj's underlying member method code with example usage: obj.set_namespaces(namespaces, features) without return types