DataFrame.
to_period
Convert DataFrame from DatetimeIndex to PeriodIndex.
Convert DataFrame from DatetimeIndex to PeriodIndex with desired frequency (inferred from index if not passed).
Frequency of the PeriodIndex.
The axis to convert (the index by default).
If False then underlying input data is not copied.