, k_diff=1, k_seasonal_diff=None, seasonal_periods=1)[source]

Difference a series simply and/or seasonally along the zero-th axis.

Given a series (denoted \(y_t\)), performs the differencing operation

\[\Delta^d \Delta_s^D y_t\]

where \(d =\) diff, \(s =\) seasonal_periods, \(D =\) seasonal_diff, and \(\Delta\) is the difference operator.


The series to be differenced.

k_diffint, optional

The number of simple differences to perform. Default is 1.

k_seasonal_diffint or None, optional

The number of seasonal differences to perform. Default is no seasonal differencing.

seasonal_periodsint, optional

The seasonal lag. Default is 1. Unused if there is no seasonal differencing.


The differenced array.

Last update: Feb 28, 2024