DOC: point out that only period frequencies are valid for to_period
Updated docs for `to_period`. Point out that only `period` frequencies are valid for `to_period`. For example, offset frequency `'MS'` isn't valid for `to_period`.

```
>>> df = pd.DataFrame({"y": [1, 2]}, `index=pd.to_datetime(["2000-03-31` 00:00:00", "2000-05-31 00:00:00"]))
>>> df.index.to_period("MS")
AttributeError: 'pandas._libs.tslibs.offsets.MonthBegin' object has no attribute '_period_dtype_code'

```
Maybe it would be better to have 2 different tables, for offset aliases and period aliases, instead of this one for [offset aliases](https://pandas.pydata.org/docs/user_guide/timeseries.html#timeseries-offset-aliases)?
Thanks @natmokval 

> Maybe it would be better to have 2 different tables, for [offset aliases](https://pandas.pydata.org/docs/user_guide/timeseries.html#timeseries-offset-aliases) and period aliases, instead of this one for offset aliases?

Yeah I think this would be useful. Do you have the offsets on-hand that don't work with Periods? > Thanks @natmokval
> 
> Yeah I think this would be useful. Do you have the offsets on-hand that don't work with Periods?

The aliases listed below don't work with period:

```
SM 'pandas._libs.tslibs.offsets.SemiMonthEnd' object has no attribute '_period_dtype_code'
BM 'pandas._libs.tslibs.offsets.BusinessMonthEnd' object has no attribute '_period_dtype_code'
CBM 'pandas._libs.tslibs.offsets.CustomBusinessMonthEnd' object has no attribute '_period_dtype_code'
MS 'pandas._libs.tslibs.offsets.MonthBegin' object has no attribute '_period_dtype_code'
SMS 'pandas._libs.tslibs.offsets.SemiMonthBegin' object has no attribute '_period_dtype_code'
BMS 'pandas._libs.tslibs.offsets.BusinessMonthBegin' object has no attribute '_period_dtype_code'
CBMS 'pandas._libs.tslibs.offsets.CustomBusinessMonthBeg' object has no attribute '_period_dtype_code'
BQ 'pandas._libs.tslibs.offsets.BQuarterEnd' object has no attribute '_period_dtype_code'
QS 'pandas._libs.tslibs.offsets.QuarterBegin' object has no attribute '_period_dtype_code'
BQS 'pandas._libs.tslibs.offsets.BQuarterBegin' object has no attribute '_period_dtype_code'
BA 'pandas._libs.tslibs.offsets.BYearEnd' object has no attribute '_period_dtype_code'
BY 'pandas._libs.tslibs.offsets.BYearEnd' object has no attribute '_period_dtype_code'
AS 'pandas._libs.tslibs.offsets.YearBegin' object has no attribute '_period_dtype_code'
YS 'pandas._libs.tslibs.offsets.YearBegin' object has no attribute '_period_dtype_code'
BAS 'pandas._libs.tslibs.offsets.BYearBegin' object has no attribute '_period_dtype_code'
BYS 'pandas._libs.tslibs.offsets.BYearBegin' object has no attribute '_period_dtype_code'
BH 'pandas._libs.tslibs.offsets.BusinessHour' object has no attribute '_period_dtype_code'

```