class_docstr: The namespace type for the constructor of DFtoVW.
  The Namespace is a container for Feature object(s), and thus must
  be composed of a Feature object or a list of Feature objects.
class_docstr_tok: ["The","namespace","type","for","the","constructor","of","DFtoVW",".","The","Namespace","is","a","container","for","Feature","object","(","s",")",",","and","thus","must","be","composed","of","a","Feature","object","or","a","list","of","Feature","objects","."]
docstr: Initialize a Namespace instance.
  
  Args:
      features: A (list of) Feature object(s) that form the namespace.
      name: The name of the namespace.
      value: A constant that specify the scaling factor for the features of this
          namespace.
  
  Examples:
      >>> from vowpalwabbit.dftovw import Namespace, Feature
      >>> ns_one_feature = Namespace(Feature("a"))
      >>> ns_multi_features = Namespace([Feature("a"), Feature("b")])
      >>> ns_one_feature_with_name = Namespace(Feature("a"), name="FirstNamespace")
      >>> ns_one_feature_with_name_and_value = Namespace(Feature("a"), name="FirstNamespace", value=2)
docstr_tok: ["Initialize","a","Namespace","instance",".","Args",":","features",":","A","(","list","of",")","Feature","object","(","s",")","that","form","the","namespace",".","name",":","The","name","of","the","namespace",".","value",":","A","constant","that","specify","the","scaling","factor","for","the","features","of","this","namespace",".","Examples",":",">",">",">","from","vowpalwabbit.dftovw","import","Namespace",",","Feature",">",">",">","ns_one_feature","=","Namespace","(","Feature","(","``","a","''",")",")",">",">",">","ns_multi_features","=","Namespace","(","[","Feature","(","``","a","''",")",",","Feature","(","``","b","''",")","]",")",">",">",">","ns_one_feature_with_name","=","Namespace","(","Feature","(","``","a","''",")",",","name=","''","FirstNamespace","''",")",">",">",">","ns_one_feature_with_name_and_value","=","Namespace","(","Feature","(","``","a","''",")",",","name=","''","FirstNamespace","''",",","value=2",")"]
code: def __init__(
      self,
      features: Union[Feature, List[Feature]],
      name: Optional[Union[str, int, float]] = None,
      value: Optional[Union[int, float]] = None,
  ):
      """Initialize a Namespace instance.
  
      Args:
          features: A (list of) Feature object(s) that form the namespace.
          name: The name of the namespace.
          value: A constant that specify the scaling factor for the features of this
              namespace.
  
      Examples:
          >>> from vowpalwabbit.dftovw import Namespace, Feature
          >>> ns_one_feature = Namespace(Feature("a"))
          >>> ns_multi_features = Namespace([Feature("a"), Feature("b")])
          >>> ns_one_feature_with_name = Namespace(Feature("a"), name="FirstNamespace")
          >>> ns_one_feature_with_name_and_value = Namespace(Feature("a"), name="FirstNamespace", value=2)
      """
  
      if (value is not None) and (name is None or name == ""):
          raise ValueError(
              "Namespace can't have a 'value' argument without a 'name' argument or an empty string 'name' argument"
          )
      self.name = _Col.make_valid_name(name) if name else None
      self.value = value
      self.features = (
          list(features)
          if isinstance(features, (list, set))
          else [features]
      )
      self.check_attributes_type()
  
imports: import warnings
  import numpy
  import pandas
  from typing import Any, Hashable, List, Optional, Tuple, Type, Union
label_desc: Use image node_id 1 to create a new Namespace object from inherited base classes: object with example: obj = Namespace(features, name, value)