Date offsets

DateOffset

DateOffset([n, normalize])

Standard kind of date increment used for a date range.

BusinessDay

BusinessDay([n, normalize, offset])

DateOffset subclass representing possibly n business days.

Methods

BusinessDay.apply(other)

BusinessDay.apply_index(other)

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

BusinessDay.copy()

BusinessDay.isAnchored()

BusinessDay.onOffset(dt)

BusinessDay.is_anchored()

BusinessDay.is_on_offset(dt)

BusinessDay.__call__(other)

Call self as a function.

BusinessHour

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

DateOffset subclass representing possibly n business hours.

MonthOffset

MonthOffset([n, normalize])

Attributes

Methods

MonthOffset.apply(other)

MonthOffset.apply_index(other)

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

MonthOffset.copy()

MonthOffset.isAnchored()

MonthOffset.onOffset(dt)

MonthOffset.is_anchored()

MonthOffset.is_on_offset(dt)

MonthOffset.__call__(other)

Call self as a function.

MonthEnd

MonthEnd([n, normalize])

DateOffset of one month end.

Methods

MonthEnd.apply(other)

MonthEnd.apply_index(other)

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

MonthEnd.copy()

MonthEnd.isAnchored()

MonthEnd.onOffset(dt)

MonthEnd.is_anchored()

MonthEnd.is_on_offset(dt)

MonthEnd.__call__(other)

Call self as a function.

MonthBegin

MonthBegin([n, normalize])

DateOffset of one month at beginning.

Methods

MonthBegin.apply(other)

MonthBegin.apply_index(other)

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

MonthBegin.copy()

MonthBegin.isAnchored()

MonthBegin.onOffset(dt)

MonthBegin.is_anchored()

MonthBegin.is_on_offset(dt)

MonthBegin.__call__(other)

Call self as a function.

BusinessMonthEnd

BusinessMonthEnd([n, normalize])

DateOffset increments between business EOM dates.

Methods

BusinessMonthEnd.apply(other)

BusinessMonthEnd.apply_index(other)

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

BusinessMonthEnd.copy()

BusinessMonthEnd.isAnchored()

BusinessMonthEnd.onOffset(dt)

BusinessMonthEnd.is_anchored()

BusinessMonthEnd.is_on_offset(dt)

BusinessMonthEnd.__call__(other)

Call self as a function.

BusinessMonthBegin

BusinessMonthBegin([n, normalize])

DateOffset of one business month at beginning.

Methods

BusinessMonthBegin.apply(other)

BusinessMonthBegin.apply_index(other)

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

BusinessMonthBegin.copy()

BusinessMonthBegin.isAnchored()

BusinessMonthBegin.onOffset(dt)

BusinessMonthBegin.is_anchored()

BusinessMonthBegin.is_on_offset(dt)

BusinessMonthBegin.__call__(other)

Call self as a function.

SemiMonthOffset

SemiMonthOffset([n, normalize, day_of_month])

Attributes

Methods

SemiMonthOffset.apply(other)

SemiMonthOffset.apply_index(other)

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

SemiMonthOffset.copy()

SemiMonthOffset.isAnchored()

SemiMonthOffset.onOffset(dt)

SemiMonthOffset.is_anchored()

SemiMonthOffset.is_on_offset(dt)

SemiMonthOffset.__call__(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(other)

SemiMonthEnd.apply_index(other)

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

SemiMonthEnd.copy()

SemiMonthEnd.isAnchored()

SemiMonthEnd.onOffset(dt)

SemiMonthEnd.is_anchored()

SemiMonthEnd.is_on_offset(dt)

SemiMonthEnd.__call__(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(other)

SemiMonthBegin.apply_index(other)

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

SemiMonthBegin.copy()

SemiMonthBegin.isAnchored()

SemiMonthBegin.onOffset(dt)

SemiMonthBegin.is_anchored()

SemiMonthBegin.is_on_offset(dt)

SemiMonthBegin.__call__(other)

Call self as a function.

Week

Week([n, normalize, weekday])

Weekly offset.

Methods

Week.apply(other)

Week.apply_index(other)

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

Week.copy()

Week.isAnchored()

Week.onOffset(dt)

Week.is_anchored()

Week.is_on_offset(dt)

Week.__call__(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”.

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(other)

QuarterOffset.apply_index(other)

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

QuarterOffset.copy()

QuarterOffset.isAnchored()

QuarterOffset.onOffset(dt)

QuarterOffset.is_anchored()

QuarterOffset.is_on_offset(dt)

QuarterOffset.__call__(other)

Call self as a function.

BQuarterEnd

BQuarterEnd([n, normalize, startingMonth])

DateOffset increments between business Quarter dates.

Methods

BQuarterEnd.apply(other)

BQuarterEnd.apply_index(other)

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

BQuarterEnd.copy()

BQuarterEnd.isAnchored()

BQuarterEnd.onOffset(dt)

BQuarterEnd.is_anchored()

BQuarterEnd.is_on_offset(dt)

BQuarterEnd.__call__(other)

Call self as a function.

BQuarterBegin

BQuarterBegin([n, normalize, startingMonth])

Attributes

Methods

BQuarterBegin.apply(other)

BQuarterBegin.apply_index(other)

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

BQuarterBegin.copy()

BQuarterBegin.isAnchored()

BQuarterBegin.onOffset(dt)

BQuarterBegin.is_anchored()

BQuarterBegin.is_on_offset(dt)

BQuarterBegin.__call__(other)

Call self as a function.

QuarterEnd

QuarterEnd([n, normalize, startingMonth])

DateOffset increments between business Quarter dates.

Methods

QuarterEnd.apply(other)

QuarterEnd.apply_index(other)

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

QuarterEnd.copy()

QuarterEnd.isAnchored()

QuarterEnd.onOffset(dt)

QuarterEnd.is_anchored()

QuarterEnd.is_on_offset(dt)

QuarterEnd.__call__(other)

Call self as a function.

QuarterBegin

QuarterBegin([n, normalize, startingMonth])

Attributes

Methods

QuarterBegin.apply(other)

QuarterBegin.apply_index(other)

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

QuarterBegin.copy()

QuarterBegin.isAnchored()

QuarterBegin.onOffset(dt)

QuarterBegin.is_anchored()

QuarterBegin.is_on_offset(dt)

QuarterBegin.__call__(other)

Call self as a function.

YearOffset

YearOffset([n, normalize, month])

DateOffset that just needs a month.

Methods

YearOffset.apply(other)

YearOffset.apply_index(other)

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

YearOffset.copy()

YearOffset.isAnchored()

YearOffset.onOffset(dt)

YearOffset.is_anchored()

YearOffset.is_on_offset(dt)

YearOffset.__call__(other)

Call self as a function.

BYearEnd

BYearEnd([n, normalize, month])

DateOffset increments between business EOM dates.

Methods

BYearEnd.apply(other)

BYearEnd.apply_index(other)

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

BYearEnd.copy()

BYearEnd.isAnchored()

BYearEnd.onOffset(dt)

BYearEnd.is_anchored()

BYearEnd.is_on_offset(dt)

BYearEnd.__call__(other)

Call self as a function.

BYearBegin

BYearBegin([n, normalize, month])

DateOffset increments between business year begin dates.

Methods

BYearBegin.apply(other)

BYearBegin.apply_index(other)

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

BYearBegin.copy()

BYearBegin.isAnchored()

BYearBegin.onOffset(dt)

BYearBegin.is_anchored()

BYearBegin.is_on_offset(dt)

BYearBegin.__call__(other)

Call self as a function.

YearEnd

YearEnd([n, normalize, month])

DateOffset increments between calendar year ends.

Methods

YearEnd.apply(other)

YearEnd.apply_index(other)

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

YearEnd.copy()

YearEnd.isAnchored()

YearEnd.onOffset(dt)

YearEnd.is_anchored()

YearEnd.is_on_offset(dt)

YearEnd.__call__(other)

Call self as a function.

YearBegin

YearBegin([n, normalize, month])

DateOffset increments between calendar year begin dates.

Methods

YearBegin.apply(other)

YearBegin.apply_index(other)

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

YearBegin.copy()

YearBegin.isAnchored()

YearBegin.onOffset(dt)

YearBegin.is_anchored()

YearBegin.is_on_offset(dt)

YearBegin.__call__(other)

Call self as a function.

FY5253

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

Describes 52-53 week fiscal year.

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.

Day

Day([n, normalize])

Attributes

Methods

Day.copy()

Day.isAnchored()

Day.onOffset(dt)

Day.is_anchored()

Day.is_on_offset(dt)

Day.__call__(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(other)

BDay.apply_index(other)

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

BDay.copy()

BDay.isAnchored()

BDay.onOffset(dt)

BDay.is_anchored()

BDay.is_on_offset(dt)

BDay.rollback(dt)

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

BDay.rollforward(dt)

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

BDay.__call__(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(other)

BMonthEnd.apply_index(other)

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

BMonthEnd.copy()

BMonthEnd.isAnchored()

BMonthEnd.onOffset(dt)

BMonthEnd.is_anchored()

BMonthEnd.is_on_offset(dt)

BMonthEnd.rollback(dt)

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

BMonthEnd.rollforward(dt)

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

BMonthEnd.__call__(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(other)

BMonthBegin.apply_index(other)

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

BMonthBegin.copy()

BMonthBegin.isAnchored()

BMonthBegin.onOffset(dt)

BMonthBegin.is_anchored()

BMonthBegin.is_on_offset(dt)

BMonthBegin.rollback(dt)

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

BMonthBegin.rollforward(dt)

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

BMonthBegin.__call__(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(other)

CBMonthEnd.apply_index(other)

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

CBMonthEnd.copy()

CBMonthEnd.isAnchored()

CBMonthEnd.onOffset(dt)

CBMonthEnd.is_anchored()

CBMonthEnd.is_on_offset(dt)

CBMonthEnd.rollback(dt)

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

CBMonthEnd.rollforward(dt)

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

CBMonthEnd.__call__(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(other)

CBMonthBegin.apply_index(other)

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

CBMonthBegin.copy()

CBMonthBegin.isAnchored()

CBMonthBegin.onOffset(dt)

CBMonthBegin.is_anchored()

CBMonthBegin.is_on_offset(dt)

CBMonthBegin.rollback(dt)

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

CBMonthBegin.rollforward(dt)

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

CBMonthBegin.__call__(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(other)

CDay.apply_index(i)

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

CDay.copy()

CDay.isAnchored()

CDay.onOffset(dt)

CDay.is_anchored()

CDay.is_on_offset(dt)

CDay.rollback(dt)

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

CDay.rollforward(dt)

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

CDay.__call__(other)

Call self as a function.

Frequencies

to_offset(freq)

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