pandas.PeriodIndex.hour#

property PeriodIndex.hour[source]#

The hour of the period.

See also

PeriodIndex.minute

The minute of the period.

PeriodIndex.second

The second of the period.

PeriodIndex.to_timestamp

Cast to DatetimeArray/Index.

Examples

>>> idx = pd.PeriodIndex(["2023-01-01 10:00", "2023-01-01 11:00"], freq='h')
>>> idx.hour
Index([10, 11], dtype='int64')