pydata/pandas — pull request #6016 by TomAugspurger (2014-01-20 20:05:35+00:00)
Title: ENH: Add sym_diff for index

If there's any interest for this in 0.14, here's the code.

Thoughts on the method name? A regular difference is `diff` so I want to be consistent with that. I figured it would be a bit weird to truncate `difference` to `diff` but not truncate `symmetric` to `sym` (or `symm`) so I went with `sym_diff` (python sets use `symmetric_difference`).

Also when writing the tests, I discovered that NaNs are *even* weirder than I thought:

```python
In [20]: idx = pd.Index([np.nan, 1, np.nan])

In [21]: sorted(set(idx))
Out[21]: [nan, 1.0, nan]
```

Seems like neither `set` nor `sorted` did anything. Anyway my PR should be consistent with this weirdness.