parameters: (self, series, key)
return_statement: return new_values
docstring: We always want to get an index value, never a value.
docstring_summary: We always want to get an index value, never a value.
docstring_tokens: We always want to get an index value never a value .
function: def get_value(self, series, key):
          """
          We always want to get an index value, never a value.
          """
          if not is_scalar(key):
              raise InvalidIndexError
  
          k = com.values_from_object(key)
          loc = self.get_loc(k)
          new_values = com.values_from_object(series)[loc]
  
          return new_values
function_tokens: def get_value ( self , series , key ) : if not is_scalar ( key ) : raise InvalidIndexError k = com . values_from_object ( key ) loc = self . get_loc ( k ) new_values = com . values_from_object ( series ) [ loc ] return new_values