pandas.PeriodIndex.hour

propertyPeriodIndex.hour[source]

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')

© 2008–2011, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
© 2011–2025, Open source contributors
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/2.3.0/reference/api/pandas.PeriodIndex.hour.html