pandas.PeriodIndex.quarter#

property PeriodIndex.quarter[source]#

The quarter of the date.

See also

PeriodIndex.qyear

Fiscal year the Period lies in according to its starting-quarter.

Examples

>>> idx = pd.PeriodIndex(["2023-01", "2023-02", "2023-03"], freq="M")
>>> idx.quarter
Index([1, 1, 1], dtype='int64')