to_pandas

PeriodIndex.to_pandas()

Converts the PeriodIndex to a pandas PeriodIndex object.

Returns

pd.PeriodIndex

A pandas PeriodIndex object.

Examples

>>> idx = PeriodIndex('2022-01-01', '2022-01-10', '1d')
>>> idx.to_pandas()
PeriodIndex(['2022-01-01', '2022-01-10'], dtype='period[1d]')