def equals(self, other):
        if isinstance(other, RangeIndex):
            ls = len(self)
            lo = len(other)
            return (ls == lo == 0 or
                    ls == lo == 1 and
                    self._start == other._start or
                    ls == lo and
                    self._start == other._start and
                    self._step == other._step)

        return super(RangeIndex, self).equals(other)
Determines if two Index objects contain the same elements.
dataset/ETHPy150Open pydata/pandas/pandas/indexes/range.py/RangeIndex.equals