def symmetric_difference(self, other, result_name=None):
        self._assert_can_do_setop(other)
        other, result_name_update = self._convert_can_do_setop(other)
        if result_name is None:
            result_name = result_name_update

        the_diff = sorted(set((self.difference(other)).
                              union(other.difference(self))))
        attribs = self._get_attributes_dict()
        attribs['name'] = result_name
        if 'freq' in attribs:
            attribs['freq'] = None
        return self._shallow_copy_with_infer(the_diff, **attribs)
Compute the sorted symmetric difference of two Index objects.
dataset/ETHPy150Open pydata/pandas/pandas/indexes/base.py/Index.symmetric_difference