pandas.tseries.offsets.BusinessDay#
- class pandas.tseries.offsets.BusinessDay#
- DateOffset subclass representing possibly n business days. - Parameters:
- nint, default 1
- The number of days represented. 
- normalizebool, default False
- Normalize start/end dates to midnight. 
 
 - Examples - You can use the parameter - nto represent a shift of n business days.- >>> ts = pd.Timestamp(2022, 12, 9, 15) >>> ts.strftime('%a %d %b %Y %H:%M') 'Fri 09 Dec 2022 15:00' >>> (ts + pd.offsets.BusinessDay(n=5)).strftime('%a %d %b %Y %H:%M') 'Fri 16 Dec 2022 15:00' - Passing the parameter - normalizeequal to True, you shift the start of the next business day to midnight.- >>> ts = pd.Timestamp(2022, 12, 9, 15) >>> ts + pd.offsets.BusinessDay(normalize=True) Timestamp('2022-12-12 00:00:00') - Attributes - Returns a copy of the calling offset object with n=1 and all other attributes equal. - Return a string representing the frequency. - Return a dict of extra parameters for the offset. - Return a string representing the base frequency. - Alias for self._offset. - calendar - holidays - n - nanos - normalize - rule_code - weekmask - Methods - Return a copy of the frequency. - Return boolean whether the frequency is a unit frequency (n=1). - Return boolean whether a timestamp occurs on the month end. - Return boolean whether a timestamp occurs on the month start. - Return boolean whether a timestamp intersects with this frequency. - Return boolean whether a timestamp occurs on the quarter end. - Return boolean whether a timestamp occurs on the quarter start. - Return boolean whether a timestamp occurs on the year end. - Return boolean whether a timestamp occurs on the year start. - Roll provided date backward to next offset only if not on offset. - Roll provided date forward to next offset only if not on offset.