pandas.tseries.offsets.HalfYearEnd#
- class pandas.tseries.offsets.HalfYearEnd#
DateOffset increments between half-year end dates.
startingMonth = 1 corresponds to dates like 1/31/2007, 7/31/2007, … startingMonth = 2 corresponds to dates like 2/28/2007, 8/31/2007, … startingMonth = 6 corresponds to dates like 6/30/2007, 12/31/2007, …
- Parameters:
- nint, default 1
The number of half-years represented.
- normalizebool, default False
Normalize start/end dates to midnight before generating date range.
- startingMonthint, default 6
The month of the year in which half-years end.
Attributes
Return the month of the year that anchors the half-years.
See also
DateOffsetStandard kind of date increment.
Examples
>>> ts = pd.Timestamp(2022, 1, 1) >>> ts + pd.offsets.HalfYearEnd() Timestamp('2022-06-30 00:00:00')