Date Offsets — pandas 0.24.0rc1 documentation (original) (raw)

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.

BusinessHour

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

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.

MonthEnd

MonthEnd DateOffset of one month end.

MonthBegin

MonthBegin DateOffset of one month at beginning.

BusinessMonthEnd

BusinessMonthEnd DateOffset increments between business EOM dates.

CustomBusinessMonthEnd

CustomBusinessMonthEnd([n, normalize, …]) DateOffset subclass representing one custom business month, incrementing between end of month dates.

CustomBusinessMonthBegin

CustomBusinessMonthBegin([n, normalize, …]) DateOffset subclass representing one custom business month, incrementing between beginning of month dates.

SemiMonthEnd

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

SemiMonthBegin

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

Week

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

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.

BQuarterEnd

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

BQuarterBegin

BQuarterBegin([n, normalize, startingMonth]) Attributes

QuarterEnd

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

QuarterBegin

QuarterBegin([n, normalize, startingMonth]) Attributes

YearOffset

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

BYearEnd

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

BYearBegin

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

YearEnd

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

YearBegin

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

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 DateOffset for the Easter holiday using logic defined in dateutil.

Tick

Tick([n, normalize]) Attributes

Day

Day([n, normalize]) Attributes

Hour

Hour([n, normalize]) Attributes

Minute

Minute([n, normalize]) Attributes

Second

Second([n, normalize]) Attributes

Milli

Milli([n, normalize]) Attributes

Micro

Micro([n, normalize]) Attributes

Nano

Nano([n, normalize]) Attributes

Frequencies

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