pandas.PeriodIndex.month#
- property PeriodIndex.month[source]#
The month as January=1, December=12.
See also
PeriodIndex.days_in_month
The number of days in the month.
PeriodIndex.daysinmonth
The number of days in the month.
Examples
>>> idx = pd.PeriodIndex(["2023-01", "2023-02", "2023-03"], freq="M") >>> idx.month Index([1, 2, 3], dtype='int64')