pydata/pandas — pull request #7741 by sinhrks (2014-07-13 00:14:25+00:00)
Title: ENH: PeriodIndex ops can accept Index

Fixes 2 issues related to ``DetetimeIndex`` and ``PeriodIndex`` ops.

- Addition / subtraction between ``PeriodIndex`` raise ``TypeError``.
```
pidx + pidx
# TypeError: unsupported operand type(s) for +: 'PeriodIndex' and 'PeriodIndex'
```

- In-place addition / subtraction doesn't return the same result as normal addition / subtraction. Specifically, ``PeriodIndex`` in-place operation results in ``Int64Index`` (Closes #6527)
```
didx = pd.date_range('2011-01-01', freq='D', periods=5)

# This results shift (expected)
didx + 1
#
# [2011-01-02, ..., 2011-01-06]
# Length: 5, Freq: D, Timezone: None

# This result adding 1 unit (nano second) (NG)
didx += 1
didx
#
# [2011-01-01 00:00:00.000000001, ..., 2011-01-05 00:00:00.000000001]
# Length: 5, Freq: None, Timezone: None
```