pandas.Period.quarter#

Period.quarter#

Return the quarter this Period falls on.

Quarter 1 includes January through March, quarter 2 includes April through June, quarter 3 includes July through September, and quarter 4 includes October through December.

The value comes from the last day of the first unit of the period’s frequency, so a "2M" period uses the last day of its first month. For fiscal quarterly frequencies such as "Q-MAR", this is the fiscal quarter instead.

See also

Timestamp.quarter

Return the quarter of the Timestamp.

Period.year

Return the year of the period.

Period.month

Return the month of the period.

Period.start_time

Get the Timestamp for the start of the period.

Period.end_time

Get the Timestamp for the end of the period.

Examples

>>> period = pd.Period('2022-04', 'M')
>>> period.quarter
2