pandas
PeriodIndex.hour
The hour of the period.
Examples
>>> idx = pd.PeriodIndex(["2023-01-01 10:00", "2023-01-01 11:00"], freq='H') >>> idx.hour Index([10, 11], dtype='int64')
previous
pandas.PeriodIndex.freqstr
next
pandas.PeriodIndex.is_leap_year