class_docstr: When expanding the columns from variables to features, this class keeps
  track of the 1:m mapping between the collapsed and expanded columns.
  
  Args:
      schema: A dictionary mapping a variable (can be any hashable object) to
          a data type. Permissible data types are stored in the class
          attribute ``PERMISSIBLE_TYPES``.
class_docstr_tok: ["When","expanding","the","columns","from","variables","to","features",",","this","class","keeps","track","of","the","1",":","m","mapping","between","the","collapsed","and","expanded","columns",".","Args",":","schema",":","A","dictionary","mapping","a","variable","(","can","be","any","hashable","object",")","to","a","data","type",".","Permissible","data","types","are","stored","in","the","class","attribute","``","PERMISSIBLE_TYPES","``","."]
docstr: Gets the feature index.
  
  Returns:
       The index of a feature.
  
  Raises:
      ValueError: if a categorical variable instead of a categorical
          "one-hot" feature is provided.
docstr_tok: ["Gets","the","feature","index",".","Returns",":","The","index","of","a","feature",".","Raises",":","ValueError",":","if","a","categorical","variable","instead","of","a","categorical","``","one-hot","''","feature","is","provided","."]
code: def get_feature_index(self, feature: Hashable) -> int:
      """
      Gets the feature index.
  
      Returns:
           The index of a feature.
  
      Raises:
          ValueError: if a categorical variable instead of a categorical
              "one-hot" feature is provided.
      """
      if (
          feature in self.variable_list
          and feature not in self.feature_list
      ):
          raise ValueError(
              "Input is not a feature, use ``get_indices`` to get the indices "
              "associated for a variable/node."
          )
      return self._fte_index_dict[feature]
  
file_path: causalnex/causalnex/structure/categorical_variable_mapper.py
imports: import re
  from collections import OrderedDict
  from itertools import chain
  from typing import Dict, Hashable, Iterator, List, Optional, Set, Union
  from networkx.classes.reportviews import NodeView
label_desc: Use image node_id 7 for calling the VariableFeatureMapper obj's underlying member method code with example usage: obj.get_feature_index(feature) and returns: self