statsmodels.tsa.deterministic.CalendarTimeTrend.from_string
-
classmethod CalendarTimeTrend.from_string(freq, trend, base_period=
None)[source]
从字符串描述创建一个时间趋势。
提供与常见字符串名称的兼容性。
- Parameters:
- freq
str 一个可转换为 pandas 频率的字符串。
- trend{“n”, “c”, “t”, “ct”, “ctt”}
时间趋势的字符串表示。术语包括:
- base_period{
str, pd.Timestamp}, default None 计算时间戳时要使用的基准周期。此值被视为1,因此所有其他时间索引都被定义为自此时间戳以来的周期数或在此时间戳之前的周期数。如果未提供,则默认为PeriodIndex的pandas基准周期。
- Returns:
TimeTrend时间趋势实例。
Last update:
Oct 16, 2024