New pd variable types for pd.period arithmetic
I believe it was with the release of version 0.24.0 that changed how the arithmetic between pandas periods works, but prior to that version, if we started with

```python
x = pd.Period('2017-01')
y = pd.Period('2016-01')
diff = x-y
print(diff, ' ', type(diff))
```

The result would be:

```
12   <class 'int'>
```

diff would be the int `12`. But using version 0.24.0 and running the same code, the result is:

```
<12 * MonthEnds>   <class 'pandas.tseries.offsets.MonthEnd'>
```

And there is seemingly no easy way to convert that back to an int. One solution posted on StackOverflow (https://stackoverflow.com/questions/42822768/pandas-number-of-months-between-two-dates) suggest that we do:

```python
(diff/np.timedelta64(1, 'M')).astype(int)
```

But this is a weird way to do something that I'd imagine is needed fairly often. It also causes issues if you need to support multiple pandas versions in your codebase because this code will break when diff is an int. So that leaves me with the best solution I could think of being:

```python
try:
    (diff/np.timedelta64(1, 'M')).astype(int)
except:
    pass
```

But this seems overly convoluted. Is there a better way to do this? Or could you add a `.astype(int)` method to the MonthsEnds class?