# Buggy code
def _getitem_axis(self, key, axis=0):
    labels = self.obj._get_axis(axis)
    key = self._get_partial_string_timestamp_match_key(key, labels)

    if isinstance(key, slice):
        self._has_valid_type(key, axis)
        return self._get_slice_axis(key, axis=axis)
    elif is_bool_indexer(key):
        return self._getbool_axis(key, axis=axis)
    elif is_list_like_indexer(key):
        # GH 7349
        # possibly convert a list-like into a nested tuple
        # but don't convert a list-like of tuples
        if isinstance(labels, MultiIndex):
            if (
                not isinstance(key, tuple)
                and len(key) > 1
                and not isinstance(key[0], tuple)
            ):
                key = tuple([key])

        # an iterable multi-selection
        if not (isinstance(key, tuple) and isinstance(labels, MultiIndex)):
            if hasattr(key, "ndim") and key.ndim > 1:
                raise ValueError("Cannot index with multidimensional key")

            return self._getitem_iterable(key, axis=axis)

        # nested tuple slicing
        if is_nested_tuple(key, labels):
            locs = labels.get_locs(key)
            indexer = [slice(None)] * self.ndim
            indexer[axis] = locs
            return self.obj.iloc[tuple(indexer)]

    # fall thru to straight lookup
    self._has_valid_type(key, axis)
    return self._get_label(key, axis=axis)


# Traceback (TypeError)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
/home/owl/miniconda3/envs/p3/lib/python3.5/site-packages/pandas/core/indexing.py in _get_label(self, label, axis)
94             try:
---> 95                 return self.obj._xs(label, axis=axis)
96             except:

/home/owl/miniconda3/envs/p3/lib/python3.5/site-packages/pandas/core/generic.py in xs(self, key, axis, level, drop_level)
1776             loc, new_index = self.index.get_loc_level(key,
-> 1777                                                       drop_level=drop_level)
1778         else:

/home/owl/miniconda3/envs/p3/lib/python3.5/site-packages/pandas/indexes/multi.py in get_loc_level(self, key, level, drop_level)
1795                 else:
-> 1796                     return partial_selection(key)
1797             else:

/home/owl/miniconda3/envs/p3/lib/python3.5/site-packages/pandas/indexes/multi.py in partial_selection(key, indexer)
1761                     if indexer is None:
-> 1762                         indexer = self.get_loc(key)
1763                     ilevels = [i for i in range(len(key))

/home/owl/miniconda3/envs/p3/lib/python3.5/site-packages/pandas/indexes/multi.py in get_loc(self, key, method)
1671         start, stop = (self.slice_locs(lead_key, lead_key)
-> 1672                        if lead_key else (0, len(self)))
1673

/home/owl/miniconda3/envs/p3/lib/python3.5/site-packages/pandas/indexes/multi.py in slice_locs(self, start, end, step, kind)
1577         # happens in get_slice_bound method), but it adds meaningful doc.
-> 1578         return super(MultiIndex, self).slice_locs(start, end, step, kind=kind)
1579

/home/owl/miniconda3/envs/p3/lib/python3.5/site-packages/pandas/indexes/base.py in slice_locs(self, start, end, step, kind)
3175         if start is not None:
-> 3176             start_slice = self.get_slice_bound(start, 'left', kind)
3177         if start_slice is None:

/home/owl/miniconda3/envs/p3/lib/python3.5/site-packages/pandas/indexes/multi.py in get_slice_bound(self, label, side, kind)
1548             label = label,
-> 1549         return self._partial_tup_index(label, side=side)
1550

/home/owl/miniconda3/envs/p3/lib/python3.5/site-packages/pandas/indexes/multi.py in _partial_tup_index(self, tup, side)
1591
-> 1592             if lab not in lev:
1593                 if not lev.is_type_compatible(lib.infer_dtype([lab])):

/home/owl/miniconda3/envs/p3/lib/python3.5/site-packages/pandas/indexes/base.py in __contains__(self, key)
1392     def __contains__(self, key):
-> 1393         hash(key)
1394         # work around some kind of odd cython bug

/home/owl/miniconda3/envs/p3/lib/python3.5/site-packages/pandas/core/generic.py in __hash__(self)
830         raise TypeError('{0!r} objects are mutable, thus they cannot be'
--> 831                         ' hashed'.format(self.__class__.__name__))
832

TypeError: 'Series' objects are mutable, thus they cannot be hashed

During handling of the above exception, another exception occurred:

TypeError                                 Traceback (most recent call last)
<ipython-input-7-5927dd14b2bf> in <module>()
4 y = pd.Series([1,3])
5 x.loc[[1,3]] # can index series with list
----> 6 x.loc[y] # cannot index series with another series

/home/owl/miniconda3/envs/p3/lib/python3.5/site-packages/pandas/core/indexing.py in __getitem__(self, key)
1309             return self._getitem_tuple(key)
1310         else:
-> 1311             return self._getitem_axis(key, axis=0)
1312
1313     def _getitem_axis(self, key, axis=0):

/home/owl/miniconda3/envs/p3/lib/python3.5/site-packages/pandas/core/indexing.py in _getitem_axis(self, key, axis)
1480         # fall thru to straight lookup
1481         self._has_valid_type(key, axis)
-> 1482         return self._get_label(key, axis=axis)
1483
1484

/home/owl/miniconda3/envs/p3/lib/python3.5/site-packages/pandas/core/indexing.py in _get_label(self, label, axis)
95                 return self.obj._xs(label, axis=axis)
96             except:
---> 97                 return self.obj[label]
98         elif isinstance(label, tuple) and isinstance(label[axis], slice):
99             raise IndexingError('no slices here, handle elsewhere')

/home/owl/miniconda3/envs/p3/lib/python3.5/site-packages/pandas/core/series.py in __getitem__(self, key)
640             key = check_bool_indexer(self.index, key)
641
--> 642         return self._get_with(key)
643
644     def _get_with(self, key):

/home/owl/miniconda3/envs/p3/lib/python3.5/site-packages/pandas/core/series.py in _get_with(self, key)
653             if isinstance(key, tuple):
654                 try:
--> 655                     return self._get_values_tuple(key)
656                 except:
657                     if len(key) == 1:

/home/owl/miniconda3/envs/p3/lib/python3.5/site-packages/pandas/core/series.py in _get_values_tuple(self, key)
701
702         # If key is contained, would have returned by now
--> 703         indexer, new_index = self.index.get_loc_level(key)
704         return self._constructor(self._values[indexer],
705                                  index=new_index).__finalize__(self)

/home/owl/miniconda3/envs/p3/lib/python3.5/site-packages/pandas/indexes/multi.py in get_loc_level(self, key, level, drop_level)
1794                         return partial_selection(key)
1795                 else:
-> 1796                     return partial_selection(key)
1797             else:
1798                 indexer = None

/home/owl/miniconda3/envs/p3/lib/python3.5/site-packages/pandas/indexes/multi.py in partial_selection(key, indexer)
1760                 def partial_selection(key, indexer=None):
1761                     if indexer is None:
-> 1762                         indexer = self.get_loc(key)
1763                     ilevels = [i for i in range(len(key))
1764                                if key[i] != slice(None, None)]

/home/owl/miniconda3/envs/p3/lib/python3.5/site-packages/pandas/indexes/multi.py in get_loc(self, key, method)
1670         lead_key, follow_key = key[:i], key[i:]
1671         start, stop = (self.slice_locs(lead_key, lead_key)
-> 1672                        if lead_key else (0, len(self)))
1673
1674         if start == stop:

/home/owl/miniconda3/envs/p3/lib/python3.5/site-packages/pandas/indexes/multi.py in slice_locs(self, start, end, step, kind)
1576         # This function adds nothing to its parent implementation (the magic
1577         # happens in get_slice_bound method), but it adds meaningful doc.
-> 1578         return super(MultiIndex, self).slice_locs(start, end, step, kind=kind)
1579
1580     def _partial_tup_index(self, tup, side='left'):

/home/owl/miniconda3/envs/p3/lib/python3.5/site-packages/pandas/indexes/base.py in slice_locs(self, start, end, step, kind)
3174         start_slice = None
3175         if start is not None:
-> 3176             start_slice = self.get_slice_bound(start, 'left', kind)
3177         if start_slice is None:
3178             start_slice = 0

/home/owl/miniconda3/envs/p3/lib/python3.5/site-packages/pandas/indexes/multi.py in get_slice_bound(self, label, side, kind)
1547         if not isinstance(label, tuple):
1548             label = label,
-> 1549         return self._partial_tup_index(label, side=side)
1550
1551     def slice_locs(self, start=None, end=None, step=None, kind=None):

/home/owl/miniconda3/envs/p3/lib/python3.5/site-packages/pandas/indexes/multi.py in _partial_tup_index(self, tup, side)
1590             section = labs[start:end]
1591
-> 1592             if lab not in lev:
1593                 if not lev.is_type_compatible(lib.infer_dtype([lab])):
1594                     raise TypeError('Level type mismatch: %s' % lab)

/home/owl/miniconda3/envs/p3/lib/python3.5/site-packages/pandas/indexes/base.py in __contains__(self, key)
1391
1392     def __contains__(self, key):
-> 1393         hash(key)
1394         # work around some kind of odd cython bug
1395         try:

/home/owl/miniconda3/envs/p3/lib/python3.5/site-packages/pandas/core/generic.py in __hash__(self)
829     def __hash__(self):
830         raise TypeError('{0!r} objects are mutable, thus they cannot be'
--> 831                         ' hashed'.format(self.__class__.__name__))
832
833     def __iter__(self):

TypeError: 'Series' objects are mutable, thus they cannot be hashed

# Fixed code
def _getitem_axis(self, key, axis=0):
    labels = self.obj._get_axis(axis)
    key = self._get_partial_string_timestamp_match_key(key, labels)

    if isinstance(key, slice):
        self._has_valid_type(key, axis)
        return self._get_slice_axis(key, axis=axis)
    elif is_bool_indexer(key):
        return self._getbool_axis(key, axis=axis)
    elif is_list_like_indexer(key):
        # GH 7349
        # possibly convert a list-like into a nested tuple
        # but don't convert a list-like of tuples
        if isinstance(labels, MultiIndex):
            if (
                not isinstance(key, tuple)
                and len(key) > 1
                and not isinstance(key[0], tuple)
            ):
                if isinstance(key, ABCSeries):
                    # GH 14730
                    key = list(key)
                key = tuple([key])

        # an iterable multi-selection
        if not (isinstance(key, tuple) and isinstance(labels, MultiIndex)):
            if hasattr(key, "ndim") and key.ndim > 1:
                raise ValueError("Cannot index with multidimensional key")

            return self._getitem_iterable(key, axis=axis)

        # nested tuple slicing
        if is_nested_tuple(key, labels):
            locs = labels.get_locs(key)
            indexer = [slice(None)] * self.ndim
            indexer[axis] = locs
            return self.obj.iloc[tuple(indexer)]

    # fall thru to straight lookup
    self._has_valid_type(key, axis)
    return self._get_label(key, axis=axis)