offset¶
- offset(i)[source]¶
Time interval in step
i
This cells if for controlling the number of months in step
i
. Stepi
is from one day afterdate_(i)
todate_(i+1)
. This cells should return an object of a sub calass of pandas DateOffset, such as MonthEnd and YearEnd object. The returned object must always represent end of month, and must not be longer than 1 year.To set the length of step
i
toN
monthhs, offset(i) should returnpd.offsets.MonthEnd(N)
. To set the length to 1 year, offset(i) should returnpd.offsets.Year(1)
.By default, the formula is set so that the model projects monthly for the first 60 months (5 years) then annually after that.
offset()
is defined as:if i < 60: return pd.offsets.MonthEnd(1) else: return pd.offsets.YearEnd(1)
See also