pandas.tseries.offsets.BYearEnd#

class pandas.tseries.offsets.BYearEnd#

DateOffset increments between the last business day of the year.

This offset moves dates to the last business day of the specified month (default December), skipping weekends.

Parameters:
nint, default 1

The number of years represented.

normalizebool, default False

Normalize start/end dates to midnight before generating date range.

monthint, default 12

A specific integer for the month of the year.

Attributes

month

Return the month of the year on which this offset applies.

See also

DateOffset

Standard kind of date increment.

Examples

>>> from pandas.tseries.offsets import BYearEnd
>>> ts = pd.Timestamp('2020-05-24 05:01:15')
>>> ts - BYearEnd()
Timestamp('2019-12-31 05:01:15')
>>> ts + BYearEnd()
Timestamp('2020-12-31 05:01:15')
>>> ts + BYearEnd(3)
Timestamp('2022-12-30 05:01:15')
>>> ts + BYearEnd(-3)
Timestamp('2017-12-29 05:01:15')
>>> ts + BYearEnd(month=11)
Timestamp('2020-11-30 05:01:15')