class_docstr: The feature type for the constructor of DFtoVW
class_docstr_tok: ["The","feature","type","for","the","constructor","of","DFtoVW"]
docstr: Initialize a Feature instance.
  
  Args:
      value: The column name with the value of the feature.
      rename_feature: The name to use instead of the default (which is the column name defined in the value argument).
      as_type: Enforce a specific type ('numerical' or 'categorical')
docstr_tok: ["Initialize","a","Feature","instance",".","Args",":","value",":","The","column","name","with","the","value","of","the","feature",".","rename_feature",":","The","name","to","use","instead","of","the","default","(","which","is","the","column","name","defined","in","the","value","argument",")",".","as_type",":","Enforce","a","specific","type","(","'numerical","'","or","'categorical","'",")"]
code: def __init__(
      self,
      value: Hashable,
      rename_feature: Optional[str] = None,
      as_type: Optional[str] = None,
  ):
      """
      Initialize a Feature instance.
  
      Args:
          value: The column name with the value of the feature.
          rename_feature: The name to use instead of the default (which is the column name defined in the value argument).
          as_type: Enforce a specific type ('numerical' or 'categorical')
      """
      self.value = value
      self.name = _Col.make_valid_name(
          rename_feature
          if rename_feature is not None
          else self.value.colname
      )
      if as_type is not None and as_type not in (
          "numerical",
          "categorical",
      ):
          raise ValueError(
              "Argument 'as_type' can either be 'numerical' or 'categorical'"
          )
      else:
          self.as_type = as_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 Feature object from inherited base classes: object with example: obj = Feature(value, rename_feature, as_type)