pandas.tseries.offsets.WeekOfMonth — pandas 3.0.0.dev0+2104.ge637b4290d documentation (original) (raw)
class pandas.tseries.offsets.WeekOfMonth#
Describes monthly dates like “the Tuesday of the 2nd week of each month”.
This offset allows for generating or adjusting dates by specifying a particular week and weekday within a month. The week is zero-indexed, where 0 corresponds to the first week of the month, and weekday follows a Monday=0 convention.
Attributes
See also
offsets.Week
Describes weekly frequency adjustments.
offsets.MonthEnd
Describes month-end frequency adjustments.
date_range
Generates a range of dates based on a specific frequency.
Examples
ts = pd.Timestamp(2022, 1, 1) ts + pd.offsets.WeekOfMonth() Timestamp('2022-01-03 00:00:00')
Attributes
Methods