Use is_quarter_end to identify datetime labels that fall on the final day of a calendar quarter. Applied directly to a DatetimeIndex, it returns Boolean values that can select quarter-end rows. section 10.10
Select quarter-end oil prices
Given a daily oil-price dataframe indexed by parsed dates, evaluate df.index.is_quarter_end and use the resulting Boolean series as a mask: df.loc[df.index.is_quarter_end]. The result contains rows dated at each quarter’s end, whether that date is the 30th or 31st. section 10.10
Extend the task by:
- Comparing explicit quarter-end selection with resample for period-level summaries. section 10.10
