Date offsets

DateOffset

DateOffset([n, normalize])Standard kind of date increment used for a date range.

Properties

DateOffset.freqstr
DateOffset.kwds
DateOffset.name
DateOffset.nanos
DateOffset.normalize
DateOffset.rule_code

Methods

DateOffset.apply(self, other)
DateOffset.copy(self)
DateOffset.isAnchored(self)
DateOffset.onOffset(self, dt)

BusinessDay

BusinessDay([n, normalize, offset])DateOffset subclass representing possibly n business days.

Properties

BusinessDay.freqstr
BusinessDay.kwds
BusinessDay.name
BusinessDay.nanos
BusinessDay.normalize
BusinessDay.rule_code

Methods

BusinessDay.apply(self, other)
BusinessDay.apply_index(self, other)
BusinessDay.copy(self)
BusinessDay.isAnchored(self)
BusinessDay.onOffset(self, dt)

BusinessHour

BusinessHour([n, normalize, start, end, offset])DateOffset subclass representing possibly n business hours.

Properties

BusinessHour.freqstr
BusinessHour.kwds
BusinessHour.name
BusinessHour.nanos
BusinessHour.normalize
BusinessHour.rule_code

Methods

BusinessHour.apply(self, other)
BusinessHour.copy(self)
BusinessHour.isAnchored(self)
BusinessHour.onOffset(self, dt)

CustomBusinessDay

CustomBusinessDay([n, normalize, weekmask, …])DateOffset subclass representing possibly n custom business days, excluding holidays.

Properties

CustomBusinessDay.freqstr
CustomBusinessDay.kwds
CustomBusinessDay.name
CustomBusinessDay.nanos
CustomBusinessDay.normalize
CustomBusinessDay.rule_code

Methods

CustomBusinessDay.apply(self, other)
CustomBusinessDay.copy(self)
CustomBusinessDay.isAnchored(self)
CustomBusinessDay.onOffset(self, dt)

CustomBusinessHour

CustomBusinessHour([n, normalize, weekmask, …])DateOffset subclass representing possibly n custom business days.

Properties

CustomBusinessHour.freqstr
CustomBusinessHour.kwds
CustomBusinessHour.name
CustomBusinessHour.nanos
CustomBusinessHour.normalize
CustomBusinessHour.rule_code

Methods

CustomBusinessHour.apply(self, other)
CustomBusinessHour.copy(self)
CustomBusinessHour.isAnchored(self)
CustomBusinessHour.onOffset(self, dt)

MonthOffset

MonthOffsetAttributes

Properties

MonthOffset.freqstr
MonthOffset.kwds
MonthOffset.name
MonthOffset.nanos
MonthOffset.normalize
MonthOffset.rule_code

Methods

MonthOffset.apply(self, other)
MonthOffset.apply_index(self, other)
MonthOffset.copy(self)
MonthOffset.isAnchored(self)
MonthOffset.onOffset(self, dt)

MonthEnd

MonthEndDateOffset of one month end.

Properties

MonthEnd.freqstr
MonthEnd.kwds
MonthEnd.name
MonthEnd.nanos
MonthEnd.normalize
MonthEnd.rule_code

Methods

MonthEnd.apply(self, other)
MonthEnd.apply_index(self, other)
MonthEnd.copy(self)
MonthEnd.isAnchored(self)
MonthEnd.onOffset(self, dt)

MonthBegin

MonthBeginDateOffset of one month at beginning.

Properties

MonthBegin.freqstr
MonthBegin.kwds
MonthBegin.name
MonthBegin.nanos
MonthBegin.normalize
MonthBegin.rule_code

Methods

MonthBegin.apply(self, other)
MonthBegin.apply_index(self, other)
MonthBegin.copy(self)
MonthBegin.isAnchored(self)
MonthBegin.onOffset(self, dt)

BusinessMonthEnd

BusinessMonthEndDateOffset increments between business EOM dates.

Properties

BusinessMonthEnd.freqstr
BusinessMonthEnd.kwds
BusinessMonthEnd.name
BusinessMonthEnd.nanos
BusinessMonthEnd.normalize
BusinessMonthEnd.rule_code

Methods

BusinessMonthEnd.apply(self, other)
BusinessMonthEnd.apply_index(self, other)
BusinessMonthEnd.copy(self)
BusinessMonthEnd.isAnchored(self)
BusinessMonthEnd.onOffset(self, dt)

BusinessMonthBegin

BusinessMonthBeginDateOffset of one business month at beginning.

Properties

BusinessMonthBegin.freqstr
BusinessMonthBegin.kwds
BusinessMonthBegin.name
BusinessMonthBegin.nanos
BusinessMonthBegin.normalize
BusinessMonthBegin.rule_code

Methods

BusinessMonthBegin.apply(self, other)
BusinessMonthBegin.apply_index(self, other)
BusinessMonthBegin.copy(self)
BusinessMonthBegin.isAnchored(self)
BusinessMonthBegin.onOffset(self, dt)

CustomBusinessMonthEnd

CustomBusinessMonthEnd([n, normalize, …])DateOffset subclass representing custom business month(s).

Properties

CustomBusinessMonthEnd.freqstr
CustomBusinessMonthEnd.kwds
CustomBusinessMonthEnd.m_offset
CustomBusinessMonthEnd.name
CustomBusinessMonthEnd.nanos
CustomBusinessMonthEnd.normalize
CustomBusinessMonthEnd.rule_code

Methods

CustomBusinessMonthEnd.apply(self, other)
CustomBusinessMonthEnd.copy(self)
CustomBusinessMonthEnd.isAnchored(self)
CustomBusinessMonthEnd.onOffset(self, dt)

CustomBusinessMonthBegin

CustomBusinessMonthBegin([n, normalize, …])DateOffset subclass representing custom business month(s).

Properties

CustomBusinessMonthBegin.freqstr
CustomBusinessMonthBegin.kwds
CustomBusinessMonthBegin.m_offset
CustomBusinessMonthBegin.name
CustomBusinessMonthBegin.nanos
CustomBusinessMonthBegin.normalize
CustomBusinessMonthBegin.rule_code

Methods

CustomBusinessMonthBegin.apply(self, other)
CustomBusinessMonthBegin.copy(self)
CustomBusinessMonthBegin.isAnchored(self)
CustomBusinessMonthBegin.onOffset(self, dt)

SemiMonthOffset

SemiMonthOffset([n, normalize, day_of_month])Attributes

Properties

SemiMonthOffset.freqstr
SemiMonthOffset.kwds
SemiMonthOffset.name
SemiMonthOffset.nanos
SemiMonthOffset.normalize
SemiMonthOffset.rule_code

Methods

SemiMonthOffset.apply(self, other)
SemiMonthOffset.apply_index(self, other)
SemiMonthOffset.copy(self)
SemiMonthOffset.isAnchored(self)
SemiMonthOffset.onOffset(self, dt)

SemiMonthEnd

SemiMonthEnd([n, normalize, day_of_month])Two DateOffset’s per month repeating on the last day of the month and day_of_month.

Properties

SemiMonthEnd.freqstr
SemiMonthEnd.kwds
SemiMonthEnd.name
SemiMonthEnd.nanos
SemiMonthEnd.normalize
SemiMonthEnd.rule_code

Methods

SemiMonthEnd.apply(self, other)
SemiMonthEnd.apply_index(self, other)
SemiMonthEnd.copy(self)
SemiMonthEnd.isAnchored(self)
SemiMonthEnd.onOffset(self, dt)

SemiMonthBegin

SemiMonthBegin([n, normalize, day_of_month])Two DateOffset’s per month repeating on the first day of the month and day_of_month.

Properties

SemiMonthBegin.freqstr
SemiMonthBegin.kwds
SemiMonthBegin.name
SemiMonthBegin.nanos
SemiMonthBegin.normalize
SemiMonthBegin.rule_code

Methods

SemiMonthBegin.apply(self, other)
SemiMonthBegin.apply_index(self, other)
SemiMonthBegin.copy(self)
SemiMonthBegin.isAnchored(self)
SemiMonthBegin.onOffset(self, dt)

Week

Week([n, normalize, weekday])Weekly offset.

Properties

Week.freqstr
Week.kwds
Week.name
Week.nanos
Week.normalize
Week.rule_code

Methods

Week.apply(self, other)
Week.apply_index(self, other)
Week.copy(self)
Week.isAnchored(self)
Week.onOffset(self, dt)

WeekOfMonth

WeekOfMonth([n, normalize, week, weekday])Describes monthly dates like “the Tuesday of the 2nd week of each month”.

Properties

WeekOfMonth.freqstr
WeekOfMonth.kwds
WeekOfMonth.name
WeekOfMonth.nanos
WeekOfMonth.normalize
WeekOfMonth.rule_code

Methods

WeekOfMonth.apply(self, other)
WeekOfMonth.copy(self)
WeekOfMonth.isAnchored(self)
WeekOfMonth.onOffset(self, dt)

LastWeekOfMonth

LastWeekOfMonth([n, normalize, weekday])Describes monthly dates in last week of month like “the last Tuesday of each month”.

Properties

LastWeekOfMonth.freqstr
LastWeekOfMonth.kwds
LastWeekOfMonth.name
LastWeekOfMonth.nanos
LastWeekOfMonth.normalize
LastWeekOfMonth.rule_code

Methods

LastWeekOfMonth.apply(self, other)
LastWeekOfMonth.copy(self)
LastWeekOfMonth.isAnchored(self)
LastWeekOfMonth.onOffset(self, dt)

QuarterOffset

QuarterOffset([n, normalize, startingMonth])Quarter representation - doesn’t call super.

Properties

QuarterOffset.freqstr
QuarterOffset.kwds
QuarterOffset.name
QuarterOffset.nanos
QuarterOffset.normalize
QuarterOffset.rule_code

Methods

QuarterOffset.apply(self, other)
QuarterOffset.apply_index(self, other)
QuarterOffset.copy(self)
QuarterOffset.isAnchored(self)
QuarterOffset.onOffset(self, dt)

BQuarterEnd

BQuarterEnd([n, normalize, startingMonth])DateOffset increments between business Quarter dates.

Properties

BQuarterEnd.freqstr
BQuarterEnd.kwds
BQuarterEnd.name
BQuarterEnd.nanos
BQuarterEnd.normalize
BQuarterEnd.rule_code

Methods

BQuarterEnd.apply(self, other)
BQuarterEnd.apply_index(self, other)
BQuarterEnd.copy(self)
BQuarterEnd.isAnchored(self)
BQuarterEnd.onOffset(self, dt)

BQuarterBegin

BQuarterBegin([n, normalize, startingMonth])Attributes

Properties

BQuarterBegin.freqstr
BQuarterBegin.kwds
BQuarterBegin.name
BQuarterBegin.nanos
BQuarterBegin.normalize
BQuarterBegin.rule_code

Methods

BQuarterBegin.apply(self, other)
BQuarterBegin.apply_index(self, other)
BQuarterBegin.copy(self)
BQuarterBegin.isAnchored(self)
BQuarterBegin.onOffset(self, dt)

QuarterEnd

QuarterEnd([n, normalize, startingMonth])DateOffset increments between business Quarter dates.

Properties

QuarterEnd.freqstr
QuarterEnd.kwds
QuarterEnd.name
QuarterEnd.nanos
QuarterEnd.normalize
QuarterEnd.rule_code

Methods

QuarterEnd.apply(self, other)
QuarterEnd.apply_index(self, other)
QuarterEnd.copy(self)
QuarterEnd.isAnchored(self)
QuarterEnd.onOffset(self, dt)

QuarterBegin

QuarterBegin([n, normalize, startingMonth])Attributes

Properties

QuarterBegin.freqstr
QuarterBegin.kwds
QuarterBegin.name
QuarterBegin.nanos
QuarterBegin.normalize
QuarterBegin.rule_code

Methods

QuarterBegin.apply(self, other)
QuarterBegin.apply_index(self, other)
QuarterBegin.copy(self)
QuarterBegin.isAnchored(self)
QuarterBegin.onOffset(self, dt)

YearOffset

YearOffset([n, normalize, month])DateOffset that just needs a month.

Properties

YearOffset.freqstr
YearOffset.kwds
YearOffset.name
YearOffset.nanos
YearOffset.normalize
YearOffset.rule_code

Methods

YearOffset.apply(self, other)
YearOffset.apply_index(self, other)
YearOffset.copy(self)
YearOffset.isAnchored(self)
YearOffset.onOffset(self, dt)

BYearEnd

BYearEnd([n, normalize, month])DateOffset increments between business EOM dates.

Properties

BYearEnd.freqstr
BYearEnd.kwds
BYearEnd.name
BYearEnd.nanos
BYearEnd.normalize
BYearEnd.rule_code

Methods

BYearEnd.apply(self, other)
BYearEnd.apply_index(self, other)
BYearEnd.copy(self)
BYearEnd.isAnchored(self)
BYearEnd.onOffset(self, dt)

BYearBegin

BYearBegin([n, normalize, month])DateOffset increments between business year begin dates.

Properties

BYearBegin.freqstr
BYearBegin.kwds
BYearBegin.name
BYearBegin.nanos
BYearBegin.normalize
BYearBegin.rule_code

Methods

BYearBegin.apply(self, other)
BYearBegin.apply_index(self, other)
BYearBegin.copy(self)
BYearBegin.isAnchored(self)
BYearBegin.onOffset(self, dt)

YearEnd

YearEnd([n, normalize, month])DateOffset increments between calendar year ends.

Properties

YearEnd.freqstr
YearEnd.kwds
YearEnd.name
YearEnd.nanos
YearEnd.normalize
YearEnd.rule_code

Methods

YearEnd.apply(self, other)
YearEnd.apply_index(self, other)
YearEnd.copy(self)
YearEnd.isAnchored(self)
YearEnd.onOffset(self, dt)

YearBegin

YearBegin([n, normalize, month])DateOffset increments between calendar year begin dates.

Properties

YearBegin.freqstr
YearBegin.kwds
YearBegin.name
YearBegin.nanos
YearBegin.normalize
YearBegin.rule_code

Methods

YearBegin.apply(self, other)
YearBegin.apply_index(self, other)
YearBegin.copy(self)
YearBegin.isAnchored(self)
YearBegin.onOffset(self, dt)

FY5253

FY5253([n, normalize, weekday, …])Describes 52-53 week fiscal year.

Properties

FY5253.freqstr
FY5253.kwds
FY5253.name
FY5253.nanos
FY5253.normalize
FY5253.rule_code

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)

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).

Properties

FY5253Quarter.freqstr
FY5253Quarter.kwds
FY5253Quarter.name
FY5253Quarter.nanos
FY5253Quarter.normalize
FY5253Quarter.rule_code

Methods

FY5253Quarter.apply(self, other)
FY5253Quarter.copy(self)
FY5253Quarter.get_weeks(self, dt)
FY5253Quarter.isAnchored(self)
FY5253Quarter.onOffset(self, dt)
FY5253Quarter.year_has_extra_week(self, dt)

Easter

EasterDateOffset for the Easter holiday using logic defined in dateutil.

Properties

Easter.freqstr
Easter.kwds
Easter.name
Easter.nanos
Easter.normalize
Easter.rule_code

Methods

Easter.apply(self, other)
Easter.copy(self)
Easter.isAnchored(self)
Easter.onOffset(self, dt)

Tick

Tick([n, normalize])Attributes

Properties

Tick.delta
Tick.freqstr
Tick.kwds
Tick.name
Tick.nanos
Tick.normalize
Tick.rule_code

Methods

Tick.copy(self)
Tick.isAnchored(self)
Tick.onOffset(self, dt)

Day

Day([n, normalize])Attributes

Properties

Day.delta
Day.freqstr
Day.kwds
Day.name
Day.nanos
Day.normalize
Day.rule_code

Methods

Day.copy(self)
Day.isAnchored(self)
Day.onOffset(self, dt)

Hour

Hour([n, normalize])Attributes

Properties

Hour.delta
Hour.freqstr
Hour.kwds
Hour.name
Hour.nanos
Hour.normalize
Hour.rule_code

Methods

Hour.copy(self)
Hour.isAnchored(self)
Hour.onOffset(self, dt)

Minute

Minute([n, normalize])Attributes

Properties

Minute.delta
Minute.freqstr
Minute.kwds
Minute.name
Minute.nanos
Minute.normalize
Minute.rule_code

Methods

Minute.copy(self)
Minute.isAnchored(self)
Minute.onOffset(self, dt)

Second

Second([n, normalize])Attributes

Properties

Second.delta
Second.freqstr
Second.kwds
Second.name
Second.nanos
Second.normalize
Second.rule_code

Methods

Second.copy(self)
Second.isAnchored(self)
Second.onOffset(self, dt)

Milli

Milli([n, normalize])Attributes

Properties

Milli.delta
Milli.freqstr
Milli.kwds
Milli.name
Milli.nanos
Milli.normalize
Milli.rule_code

Methods

Milli.copy(self)
Milli.isAnchored(self)
Milli.onOffset(self, dt)

Micro

Micro([n, normalize])Attributes

Properties

Micro.delta
Micro.freqstr
Micro.kwds
Micro.name
Micro.nanos
Micro.normalize
Micro.rule_code

Methods

Micro.copy(self)
Micro.isAnchored(self)
Micro.onOffset(self, dt)

Nano

Nano([n, normalize])Attributes

Properties

Nano.delta
Nano.freqstr
Nano.kwds
Nano.name
Nano.nanos
Nano.normalize
Nano.rule_code

Methods

Nano.copy(self)
Nano.isAnchored(self)
Nano.onOffset(self, dt)

BDay

BDayalias of pandas.tseries.offsets.BusinessDay

Properties

BDay.baseReturns 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.offsetAlias for self._offset.
BDay.rule_code

Methods

BDay.apply(self, other)
BDay.apply_index(self, other)
BDay.copy(self)
BDay.isAnchored(self)
BDay.onOffset(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.

BMonthEnd

BMonthEndalias of pandas.tseries.offsets.BusinessMonthEnd

Properties

BMonthEnd.baseReturns 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)
BMonthEnd.copy(self)
BMonthEnd.isAnchored(self)
BMonthEnd.onOffset(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.

BMonthBegin

BMonthBeginalias of pandas.tseries.offsets.BusinessMonthBegin

Properties

BMonthBegin.baseReturns 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)
BMonthBegin.copy(self)
BMonthBegin.isAnchored(self)
BMonthBegin.onOffset(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.

CBMonthEnd

CBMonthEndalias of pandas.tseries.offsets.CustomBusinessMonthEnd

Properties

CBMonthEnd.baseReturns a copy of the calling offset object with n=1 and all other attributes equal.
CBMonthEnd.cbday_rollDefine default roll function to be called in apply method.
CBMonthEnd.freqstr
CBMonthEnd.kwds
CBMonthEnd.m_offset
CBMonthEnd.month_rollDefine default roll function to be called in apply method.
CBMonthEnd.name
CBMonthEnd.nanos
CBMonthEnd.normalize
CBMonthEnd.offsetAlias 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.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.

CBMonthBegin

CBMonthBeginalias of pandas.tseries.offsets.CustomBusinessMonthBegin

Properties

CBMonthBegin.baseReturns a copy of the calling offset object with n=1 and all other attributes equal.
CBMonthBegin.cbday_rollDefine default roll function to be called in apply method.
CBMonthBegin.freqstr
CBMonthBegin.kwds
CBMonthBegin.m_offset
CBMonthBegin.month_rollDefine default roll function to be called in apply method.
CBMonthBegin.name
CBMonthBegin.nanos
CBMonthBegin.normalize
CBMonthBegin.offsetAlias 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.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.

CDay

CDayalias of pandas.tseries.offsets.CustomBusinessDay

Properties

CDay.baseReturns 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.offsetAlias 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.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.

Frequencies

to_offset(freq)Return DateOffset object from string or tuple representation or datetime.timedelta object