Date offsets

DateOffset

DateOffset([n, normalize])

Standard kind of date increment used for a date range.

Methods

DateOffset.apply(self, other)

DateOffset.copy(self)

DateOffset.isAnchored(self)

DateOffset.onOffset(self, dt)

DateOffset.is_anchored(self)

DateOffset.is_on_offset(self, dt)

DateOffset.__call__(self, other)

Call self as a function.

BusinessDay

BusinessDay([n, normalize, offset])

DateOffset subclass representing possibly n business days.

Methods

BusinessDay.apply(self, other)

BusinessDay.apply_index(self, other)

Vectorized apply of DateOffset to DatetimeIndex, raises NotImplentedError for offsets without a vectorized implementation.

BusinessDay.copy(self)

BusinessDay.isAnchored(self)

BusinessDay.onOffset(self, dt)

BusinessDay.is_anchored(self)

BusinessDay.is_on_offset(self, dt)

BusinessDay.__call__(self, other)

Call self as a function.

BusinessHour

BusinessHour([n, normalize, start, end, offset])

DateOffset subclass representing possibly n business hours.

Methods

BusinessHour.apply(self, other)

BusinessHour.copy(self)

BusinessHour.isAnchored(self)

BusinessHour.onOffset(self, dt)

BusinessHour.is_anchored(self)

BusinessHour.is_on_offset(self, dt)

BusinessHour.__call__(self, other)

Call self as a function.

CustomBusinessDay

CustomBusinessDay([n, normalize, weekmask, …])

DateOffset subclass representing possibly n custom business days, excluding holidays.

CustomBusinessHour

CustomBusinessHour([n, normalize, weekmask, …])

DateOffset subclass representing possibly n custom business days.

MonthOffset

MonthOffset([n, normalize])

Attributes

Methods

MonthOffset.apply(self, other)

MonthOffset.apply_index(self, other)

Vectorized apply of DateOffset to DatetimeIndex, raises NotImplentedError for offsets without a vectorized implementation.

MonthOffset.copy(self)

MonthOffset.isAnchored(self)

MonthOffset.onOffset(self, dt)

MonthOffset.is_anchored(self)

MonthOffset.is_on_offset(self, dt)

MonthOffset.__call__(self, other)

Call self as a function.

MonthEnd

MonthEnd([n, normalize])

DateOffset of one month end.

Methods

MonthEnd.apply(self, other)

MonthEnd.apply_index(self, other)

Vectorized apply of DateOffset to DatetimeIndex, raises NotImplentedError for offsets without a vectorized implementation.

MonthEnd.copy(self)

MonthEnd.isAnchored(self)

MonthEnd.onOffset(self, dt)

MonthEnd.is_anchored(self)

MonthEnd.is_on_offset(self, dt)

MonthEnd.__call__(self, other)

Call self as a function.

MonthBegin

MonthBegin([n, normalize])

DateOffset of one month at beginning.

Methods

MonthBegin.apply(self, other)

MonthBegin.apply_index(self, other)

Vectorized apply of DateOffset to DatetimeIndex, raises NotImplentedError for offsets without a vectorized implementation.

MonthBegin.copy(self)

MonthBegin.isAnchored(self)

MonthBegin.onOffset(self, dt)

MonthBegin.is_anchored(self)

MonthBegin.is_on_offset(self, dt)

MonthBegin.__call__(self, other)

Call self as a function.

BusinessMonthEnd

BusinessMonthEnd([n, normalize])

DateOffset increments between business EOM dates.

Methods

BusinessMonthEnd.apply(self, other)

BusinessMonthEnd.apply_index(self, other)

Vectorized apply of DateOffset to DatetimeIndex, raises NotImplentedError for offsets without a vectorized implementation.

BusinessMonthEnd.copy(self)

BusinessMonthEnd.isAnchored(self)

BusinessMonthEnd.onOffset(self, dt)

BusinessMonthEnd.is_anchored(self)

BusinessMonthEnd.is_on_offset(self, dt)

BusinessMonthEnd.__call__(self, other)

Call self as a function.

BusinessMonthBegin

BusinessMonthBegin([n, normalize])

DateOffset of one business month at beginning.

Methods

BusinessMonthBegin.apply(self, other)

BusinessMonthBegin.apply_index(self, other)

Vectorized apply of DateOffset to DatetimeIndex, raises NotImplentedError for offsets without a vectorized implementation.

BusinessMonthBegin.copy(self)

BusinessMonthBegin.isAnchored(self)

BusinessMonthBegin.onOffset(self, dt)

BusinessMonthBegin.is_anchored(self)

BusinessMonthBegin.is_on_offset(self, dt)

BusinessMonthBegin.__call__(self, other)

Call self as a function.

SemiMonthOffset

SemiMonthOffset([n, normalize, day_of_month])

Attributes

Methods

SemiMonthOffset.apply(self, other)

SemiMonthOffset.apply_index(self, other)

Vectorized apply of DateOffset to DatetimeIndex, raises NotImplentedError for offsets without a vectorized implementation.

SemiMonthOffset.copy(self)

SemiMonthOffset.isAnchored(self)

SemiMonthOffset.onOffset(self, dt)

SemiMonthOffset.is_anchored(self)

SemiMonthOffset.is_on_offset(self, dt)

SemiMonthOffset.__call__(self, other)

Call self as a function.

SemiMonthEnd

SemiMonthEnd([n, normalize, day_of_month])

Two DateOffset’s per month repeating on the last day of the month and day_of_month.

Methods

SemiMonthEnd.apply(self, other)

SemiMonthEnd.apply_index(self, other)

Vectorized apply of DateOffset to DatetimeIndex, raises NotImplentedError for offsets without a vectorized implementation.

SemiMonthEnd.copy(self)

SemiMonthEnd.isAnchored(self)

SemiMonthEnd.onOffset(self, dt)

SemiMonthEnd.is_anchored(self)

SemiMonthEnd.is_on_offset(self, dt)

SemiMonthEnd.__call__(self, other)

Call self as a function.

SemiMonthBegin

SemiMonthBegin([n, normalize, day_of_month])

Two DateOffset’s per month repeating on the first day of the month and day_of_month.

Methods

SemiMonthBegin.apply(self, other)

SemiMonthBegin.apply_index(self, other)

Vectorized apply of DateOffset to DatetimeIndex, raises NotImplentedError for offsets without a vectorized implementation.

SemiMonthBegin.copy(self)

SemiMonthBegin.isAnchored(self)

SemiMonthBegin.onOffset(self, dt)

SemiMonthBegin.is_anchored(self)

SemiMonthBegin.is_on_offset(self, dt)

SemiMonthBegin.__call__(self, other)

Call self as a function.

Week

Week([n, normalize, weekday])

Weekly offset.

Methods

Week.apply(self, other)

Week.apply_index(self, other)

Vectorized apply of DateOffset to DatetimeIndex, raises NotImplentedError for offsets without a vectorized implementation.

Week.copy(self)

Week.isAnchored(self)

Week.onOffset(self, dt)

Week.is_anchored(self)

Week.is_on_offset(self, dt)

Week.__call__(self, other)

Call self as a function.

WeekOfMonth

WeekOfMonth([n, normalize, week, weekday])

Describes monthly dates like “the Tuesday of the 2nd week of each month”.

Methods

WeekOfMonth.apply(self, other)

WeekOfMonth.copy(self)

WeekOfMonth.isAnchored(self)

WeekOfMonth.onOffset(self, dt)

WeekOfMonth.is_anchored(self)

WeekOfMonth.is_on_offset(self, dt)

WeekOfMonth.__call__(self, other)

Call self as a function.

LastWeekOfMonth

LastWeekOfMonth([n, normalize, weekday])

Describes monthly dates in last week of month like “the last Tuesday of each month”.

QuarterOffset

QuarterOffset([n, normalize, startingMonth])

Quarter representation - doesn’t call super.

Methods

QuarterOffset.apply(self, other)

QuarterOffset.apply_index(self, other)

Vectorized apply of DateOffset to DatetimeIndex, raises NotImplentedError for offsets without a vectorized implementation.

QuarterOffset.copy(self)

QuarterOffset.isAnchored(self)

QuarterOffset.onOffset(self, dt)

QuarterOffset.is_anchored(self)

QuarterOffset.is_on_offset(self, dt)

QuarterOffset.__call__(self, other)

Call self as a function.

BQuarterEnd

BQuarterEnd([n, normalize, startingMonth])

DateOffset increments between business Quarter dates.

Methods

BQuarterEnd.apply(self, other)

BQuarterEnd.apply_index(self, other)

Vectorized apply of DateOffset to DatetimeIndex, raises NotImplentedError for offsets without a vectorized implementation.

BQuarterEnd.copy(self)

BQuarterEnd.isAnchored(self)

BQuarterEnd.onOffset(self, dt)

BQuarterEnd.is_anchored(self)

BQuarterEnd.is_on_offset(self, dt)

BQuarterEnd.__call__(self, other)

Call self as a function.

BQuarterBegin

BQuarterBegin([n, normalize, startingMonth])

Attributes

Methods

BQuarterBegin.apply(self, other)

BQuarterBegin.apply_index(self, other)

Vectorized apply of DateOffset to DatetimeIndex, raises NotImplentedError for offsets without a vectorized implementation.

BQuarterBegin.copy(self)

BQuarterBegin.isAnchored(self)

BQuarterBegin.onOffset(self, dt)

BQuarterBegin.is_anchored(self)

BQuarterBegin.is_on_offset(self, dt)

BQuarterBegin.__call__(self, other)

Call self as a function.

QuarterEnd

QuarterEnd([n, normalize, startingMonth])

DateOffset increments between business Quarter dates.

Methods

QuarterEnd.apply(self, other)

QuarterEnd.apply_index(self, other)

Vectorized apply of DateOffset to DatetimeIndex, raises NotImplentedError for offsets without a vectorized implementation.

QuarterEnd.copy(self)

QuarterEnd.isAnchored(self)

QuarterEnd.onOffset(self, dt)

QuarterEnd.is_anchored(self)

QuarterEnd.is_on_offset(self, dt)

QuarterEnd.__call__(self, other)

Call self as a function.

QuarterBegin

QuarterBegin([n, normalize, startingMonth])

Attributes

Methods

QuarterBegin.apply(self, other)

QuarterBegin.apply_index(self, other)

Vectorized apply of DateOffset to DatetimeIndex, raises NotImplentedError for offsets without a vectorized implementation.

QuarterBegin.copy(self)

QuarterBegin.isAnchored(self)

QuarterBegin.onOffset(self, dt)

QuarterBegin.is_anchored(self)

QuarterBegin.is_on_offset(self, dt)

QuarterBegin.__call__(self, other)

Call self as a function.

YearOffset

YearOffset([n, normalize, month])

DateOffset that just needs a month.

Methods

YearOffset.apply(self, other)

YearOffset.apply_index(self, other)

Vectorized apply of DateOffset to DatetimeIndex, raises NotImplentedError for offsets without a vectorized implementation.

YearOffset.copy(self)

YearOffset.isAnchored(self)

YearOffset.onOffset(self, dt)

YearOffset.is_anchored(self)

YearOffset.is_on_offset(self, dt)

YearOffset.__call__(self, other)

Call self as a function.

BYearEnd

BYearEnd([n, normalize, month])

DateOffset increments between business EOM dates.

Methods

BYearEnd.apply(self, other)

BYearEnd.apply_index(self, other)

Vectorized apply of DateOffset to DatetimeIndex, raises NotImplentedError for offsets without a vectorized implementation.

BYearEnd.copy(self)

BYearEnd.isAnchored(self)

BYearEnd.onOffset(self, dt)

BYearEnd.is_anchored(self)

BYearEnd.is_on_offset(self, dt)

BYearEnd.__call__(self, other)

Call self as a function.

BYearBegin

BYearBegin([n, normalize, month])

DateOffset increments between business year begin dates.

Methods

BYearBegin.apply(self, other)

BYearBegin.apply_index(self, other)

Vectorized apply of DateOffset to DatetimeIndex, raises NotImplentedError for offsets without a vectorized implementation.

BYearBegin.copy(self)

BYearBegin.isAnchored(self)

BYearBegin.onOffset(self, dt)

BYearBegin.is_anchored(self)

BYearBegin.is_on_offset(self, dt)

BYearBegin.__call__(self, other)

Call self as a function.

YearEnd

YearEnd([n, normalize, month])

DateOffset increments between calendar year ends.

Methods

YearEnd.apply(self, other)

YearEnd.apply_index(self, other)

Vectorized apply of DateOffset to DatetimeIndex, raises NotImplentedError for offsets without a vectorized implementation.

YearEnd.copy(self)

YearEnd.isAnchored(self)

YearEnd.onOffset(self, dt)

YearEnd.is_anchored(self)

YearEnd.is_on_offset(self, dt)

YearEnd.__call__(self, other)

Call self as a function.

YearBegin

YearBegin([n, normalize, month])

DateOffset increments between calendar year begin dates.

Methods

YearBegin.apply(self, other)

YearBegin.apply_index(self, other)

Vectorized apply of DateOffset to DatetimeIndex, raises NotImplentedError for offsets without a vectorized implementation.

YearBegin.copy(self)

YearBegin.isAnchored(self)

YearBegin.onOffset(self, dt)

YearBegin.is_anchored(self)

YearBegin.is_on_offset(self, dt)

YearBegin.__call__(self, other)

Call self as a function.

FY5253

FY5253([n, normalize, weekday, …])

Describes 52-53 week fiscal year.

Methods

FY5253.apply(self, other)

FY5253.copy(self)

FY5253.get_rule_code_suffix(self)

FY5253.get_year_end(self, dt)

FY5253.isAnchored(self)

FY5253.onOffset(self, dt)

FY5253.is_anchored(self)

FY5253.is_on_offset(self, dt)

FY5253.__call__(self, other)

Call self as a function.

FY5253Quarter

FY5253Quarter([n, normalize, weekday, …])

DateOffset increments between business quarter dates for 52-53 week fiscal year (also known as a 4-4-5 calendar).

Easter

Easter([n, normalize])

DateOffset for the Easter holiday using logic defined in dateutil.

Methods

Easter.apply(self, other)

Easter.copy(self)

Easter.isAnchored(self)

Easter.onOffset(self, dt)

Easter.is_anchored(self)

Easter.is_on_offset(self, dt)

Easter.__call__(self, other)

Call self as a function.

Tick

Tick([n, normalize])

Attributes

Methods

Tick.copy(self)

Tick.isAnchored(self)

Tick.onOffset(self, dt)

Tick.is_anchored(self)

Tick.is_on_offset(self, dt)

Tick.__call__(self, other)

Call self as a function.

Day

Day([n, normalize])

Attributes

Methods

Day.copy(self)

Day.isAnchored(self)

Day.onOffset(self, dt)

Day.is_anchored(self)

Day.is_on_offset(self, dt)

Day.__call__(self, other)

Call self as a function.

Hour

Hour([n, normalize])

Attributes

Methods

Hour.copy(self)

Hour.isAnchored(self)

Hour.onOffset(self, dt)

Hour.is_anchored(self)

Hour.is_on_offset(self, dt)

Hour.__call__(self, other)

Call self as a function.

Minute

Minute([n, normalize])

Attributes

Methods

Minute.copy(self)

Minute.isAnchored(self)

Minute.onOffset(self, dt)

Minute.is_anchored(self)

Minute.is_on_offset(self, dt)

Minute.__call__(self, other)

Call self as a function.

Second

Second([n, normalize])

Attributes

Methods

Second.copy(self)

Second.isAnchored(self)

Second.onOffset(self, dt)

Second.is_anchored(self)

Second.is_on_offset(self, dt)

Second.__call__(self, other)

Call self as a function.

Milli

Milli([n, normalize])

Attributes

Methods

Milli.copy(self)

Milli.isAnchored(self)

Milli.onOffset(self, dt)

Milli.is_anchored(self)

Milli.is_on_offset(self, dt)

Milli.__call__(self, other)

Call self as a function.

Micro

Micro([n, normalize])

Attributes

Methods

Micro.copy(self)

Micro.isAnchored(self)

Micro.onOffset(self, dt)

Micro.is_anchored(self)

Micro.is_on_offset(self, dt)

Micro.__call__(self, other)

Call self as a function.

Nano

Nano([n, normalize])

Attributes

Methods

Nano.copy(self)

Nano.isAnchored(self)

Nano.onOffset(self, dt)

Nano.is_anchored(self)

Nano.is_on_offset(self, dt)

Nano.__call__(self, other)

Call self as a function.

BDay

BDay

alias of pandas.tseries.offsets.BusinessDay

Properties

BDay.base

Returns a copy of the calling offset object with n=1 and all other attributes equal.

BDay.freqstr

BDay.kwds

BDay.name

BDay.nanos

BDay.normalize

BDay.offset

Alias for self._offset.

BDay.rule_code

Methods

BDay.apply(self, other)

BDay.apply_index(self, other)

Vectorized apply of DateOffset to DatetimeIndex, raises NotImplentedError for offsets without a vectorized implementation.

BDay.copy(self)

BDay.isAnchored(self)

BDay.onOffset(self, dt)

BDay.is_anchored(self)

BDay.is_on_offset(self, dt)

BDay.rollback(self, dt)

Roll provided date backward to next offset only if not on offset.

BDay.rollforward(self, dt)

Roll provided date forward to next offset only if not on offset.

BDay.__call__(self, other)

Call self as a function.

BMonthEnd

BMonthEnd

alias of pandas.tseries.offsets.BusinessMonthEnd

Properties

BMonthEnd.base

Returns a copy of the calling offset object with n=1 and all other attributes equal.

BMonthEnd.freqstr

BMonthEnd.kwds

BMonthEnd.name

BMonthEnd.nanos

BMonthEnd.normalize

BMonthEnd.rule_code

Methods

BMonthEnd.apply(self, other)

BMonthEnd.apply_index(self, other)

Vectorized apply of DateOffset to DatetimeIndex, raises NotImplentedError for offsets without a vectorized implementation.

BMonthEnd.copy(self)

BMonthEnd.isAnchored(self)

BMonthEnd.onOffset(self, dt)

BMonthEnd.is_anchored(self)

BMonthEnd.is_on_offset(self, dt)

BMonthEnd.rollback(self, dt)

Roll provided date backward to next offset only if not on offset.

BMonthEnd.rollforward(self, dt)

Roll provided date forward to next offset only if not on offset.

BMonthEnd.__call__(self, other)

Call self as a function.

BMonthBegin

BMonthBegin

alias of pandas.tseries.offsets.BusinessMonthBegin

Properties

BMonthBegin.base

Returns a copy of the calling offset object with n=1 and all other attributes equal.

BMonthBegin.freqstr

BMonthBegin.kwds

BMonthBegin.name

BMonthBegin.nanos

BMonthBegin.normalize

BMonthBegin.rule_code

Methods

BMonthBegin.apply(self, other)

BMonthBegin.apply_index(self, other)

Vectorized apply of DateOffset to DatetimeIndex, raises NotImplentedError for offsets without a vectorized implementation.

BMonthBegin.copy(self)

BMonthBegin.isAnchored(self)

BMonthBegin.onOffset(self, dt)

BMonthBegin.is_anchored(self)

BMonthBegin.is_on_offset(self, dt)

BMonthBegin.rollback(self, dt)

Roll provided date backward to next offset only if not on offset.

BMonthBegin.rollforward(self, dt)

Roll provided date forward to next offset only if not on offset.

BMonthBegin.__call__(self, other)

Call self as a function.

CBMonthEnd

CBMonthEnd

alias of pandas.tseries.offsets.CustomBusinessMonthEnd

Properties

CBMonthEnd.base

Returns a copy of the calling offset object with n=1 and all other attributes equal.

CBMonthEnd.cbday_roll

Define default roll function to be called in apply method.

CBMonthEnd.freqstr

CBMonthEnd.kwds

CBMonthEnd.m_offset

CBMonthEnd.month_roll

Define default roll function to be called in apply method.

CBMonthEnd.name

CBMonthEnd.nanos

CBMonthEnd.normalize

CBMonthEnd.offset

Alias for self._offset.

CBMonthEnd.rule_code

Methods

CBMonthEnd.apply(self, other)

CBMonthEnd.apply_index(self, other)

Vectorized apply of DateOffset to DatetimeIndex, raises NotImplentedError for offsets without a vectorized implementation.

CBMonthEnd.copy(self)

CBMonthEnd.isAnchored(self)

CBMonthEnd.onOffset(self, dt)

CBMonthEnd.is_anchored(self)

CBMonthEnd.is_on_offset(self, dt)

CBMonthEnd.rollback(self, dt)

Roll provided date backward to next offset only if not on offset.

CBMonthEnd.rollforward(self, dt)

Roll provided date forward to next offset only if not on offset.

CBMonthEnd.__call__(self, other)

Call self as a function.

CBMonthBegin

CBMonthBegin

alias of pandas.tseries.offsets.CustomBusinessMonthBegin

Properties

CBMonthBegin.base

Returns a copy of the calling offset object with n=1 and all other attributes equal.

CBMonthBegin.cbday_roll

Define default roll function to be called in apply method.

CBMonthBegin.freqstr

CBMonthBegin.kwds

CBMonthBegin.m_offset

CBMonthBegin.month_roll

Define default roll function to be called in apply method.

CBMonthBegin.name

CBMonthBegin.nanos

CBMonthBegin.normalize

CBMonthBegin.offset

Alias for self._offset.

CBMonthBegin.rule_code

Methods

CBMonthBegin.apply(self, other)

CBMonthBegin.apply_index(self, other)

Vectorized apply of DateOffset to DatetimeIndex, raises NotImplentedError for offsets without a vectorized implementation.

CBMonthBegin.copy(self)

CBMonthBegin.isAnchored(self)

CBMonthBegin.onOffset(self, dt)

CBMonthBegin.is_anchored(self)

CBMonthBegin.is_on_offset(self, dt)

CBMonthBegin.rollback(self, dt)

Roll provided date backward to next offset only if not on offset.

CBMonthBegin.rollforward(self, dt)

Roll provided date forward to next offset only if not on offset.

CBMonthBegin.__call__(self, other)

Call self as a function.

CDay

CDay

alias of pandas.tseries.offsets.CustomBusinessDay

Properties

CDay.base

Returns a copy of the calling offset object with n=1 and all other attributes equal.

CDay.freqstr

CDay.kwds

CDay.name

CDay.nanos

CDay.normalize

CDay.offset

Alias for self._offset.

CDay.rule_code

Methods

CDay.apply(self, other)

CDay.apply_index(self, i)

Vectorized apply of DateOffset to DatetimeIndex, raises NotImplentedError for offsets without a vectorized implementation.

CDay.copy(self)

CDay.isAnchored(self)

CDay.onOffset(self, dt)

CDay.is_anchored(self)

CDay.is_on_offset(self, dt)

CDay.rollback(self, dt)

Roll provided date backward to next offset only if not on offset.

CDay.rollforward(self, dt)

Roll provided date forward to next offset only if not on offset.

CDay.__call__(self, other)

Call self as a function.

Frequencies

to_offset(freq)

Return DateOffset object from string or tuple representation or datetime.timedelta object.