

def get_value(self, series, key):
    "\n        Fast lookup of value from 1-dimensional ndarray. Only use this if you\n        know what you're doing\n        "
    s = getattr(series, '_values', None)
    if (isinstance(s, Index) and lib.isscalar(key)):
        try:
            return s[key]
        except (IndexError, ValueError):
            pass
    s = _values_from_object(series)
    k = _values_from_object(key)
    k = self._convert_scalar_indexer(k, kind='getitem')
    try:
        return self._engine.get_value(s, k, tz=getattr(series.dtype, 'tz', None))
    except KeyError as e1:
        if ((len(self) > 0) and (self.inferred_type in ['integer', 'boolean'])):
            raise
        try:
            return tslib.get_value_box(s, key)
        except IndexError:
            raise
        except TypeError:
            if is_iterator(key):
                raise InvalidIndexError(key)
            else:
                raise e1
        except Exception:
            raise e1
    except TypeError:
        if lib.isscalar(key):
            raise IndexError(key)
        raise InvalidIndexError(key)

dataset/ETHPy150Open pydata/pandas/pandas/indexes/base.py Index.get_value/original