pandas.PeriodIndex.quarter — pandas 2.3.0 documentation (original) (raw)
property PeriodIndex.quarter[source]#
The quarter of the date.
Examples
idx = pd.PeriodIndex(["2023-01", "2023-02", "2023-03"], freq="M") idx.quarter Index([1, 1, 1], dtype='int64')