pandas.tseries.offsets.SemiMonthBegin#
- class pandas.tseries.offsets.SemiMonthBegin#
Two DateOffset’s per month repeating on the first day of the month & day_of_month.
This offset moves dates to the first day of the month and an additional specified day (typically the 15th by default), useful in scenarios where bi-monthly processing occurs on set days.
- Parameters:
- nint, default 1
The number of months represented.
- normalizebool, default False
Normalize start/end dates to midnight before generating date range.
- day_of_monthint, {1, 3,…,27}, default 15
A specific integer for the day of the month.
Attributes
Return the day of the month for the semi-monthly offset.
See also
tseries.offsets.SemiMonthEndTwo DateOffset’s per month repeating on the last day of the month & day_of_month.
tseries.offsets.MonthEndOffset to the last calendar day of the month.
tseries.offsets.MonthBeginOffset to the first calendar day of the month.
Examples
>>> ts = pd.Timestamp(2022, 1, 1) >>> ts + pd.offsets.SemiMonthBegin() Timestamp('2022-01-15 00:00:00')