pandas.tseries.offsets.HalfYearBegin#
- class pandas.tseries.offsets.HalfYearBegin#
DateOffset increments between half-year start dates.
startingMonth = 1 corresponds to dates like 1/01/2007, 7/01/2007, … startingMonth = 2 corresponds to dates like 2/01/2007, 8/01/2007, … startingMonth = 3 corresponds to dates like 3/01/2007, 9/01/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 1
The month of the year in which half-years start.
Attributes
Return the month of the year that anchors the half-years.
See also
DateOffsetStandard kind of date increment.
Examples
>>> ts = pd.Timestamp(2022, 2, 1) >>> ts + pd.offsets.HalfYearBegin() Timestamp('2022-07-01 00:00:00')