parameters: (self, level)
docstring: Return an Index of values for requested level.
  
          This is primarily useful to get an individual level of values from a
          MultiIndex, but is provided on Index as well for compatibility.
  
          Parameters
          ----------
          level : int or str
              It is either the integer position or the name of the level.
  
          Returns
          -------
          Index
              Calling object, as there is only one level in the Index.
  
          See Also
          --------
          cudf.core.multiindex.MultiIndex.get_level_values : Get values for
              a level of a MultiIndex.
  
          Notes
          -----
          For Index, level should be 0, since there are no multiple levels.
  
          Examples
          --------
          >>> import cudf
          >>> idx = cudf.Index(["a", "b", "c"])
          >>> idx.get_level_values(0)
          StringIndex(['a' 'b' 'c'], dtype='object')
docstring_summary: Return an Index of values for requested level.
docstring_tokens: Return an Index of values for requested level .
function: def get_level_values(self, level):
          """
          Return an Index of values for requested level.
  
          This is primarily useful to get an individual level of values from a
          MultiIndex, but is provided on Index as well for compatibility.
  
          Parameters
          ----------
          level : int or str
              It is either the integer position or the name of the level.
  
          Returns
          -------
          Index
              Calling object, as there is only one level in the Index.
  
          See Also
          --------
          cudf.core.multiindex.MultiIndex.get_level_values : Get values for
              a level of a MultiIndex.
  
          Notes
          -----
          For Index, level should be 0, since there are no multiple levels.
  
          Examples
          --------
          >>> import cudf
          >>> idx = cudf.Index(["a", "b", "c"])
          >>> idx.get_level_values(0)
          StringIndex(['a' 'b' 'c'], dtype='object')
          """
  
          if level == self.name:
              return self
          elif is_integer(level):
              if level != 0:
                  raise IndexError(
                      f"Cannot get level: {level} " f"for index with 1 level"
                  )
              return self
          else:
              raise KeyError(f"Requested level with name {level} " "not found")
function_tokens: def get_level_values ( self , level ) : if level == self . name : return self elif is_integer ( level ) : if level != 0 : raise IndexError ( f"Cannot get level: {level} " f"for index with 1 level" ) return self else : raise KeyError ( f"Requested level with name {level} " "not found" )