polars.Series.rolling_kurtosis#

Series.rolling_kurtosis(
window_size: int,
*,
fisher: bool = True,
bias: bool = True,
min_samples: int | None = None,
center: bool = False,
) Series[source]#

Compute a rolling kurtosis.

Warning

This functionality is considered unstable. It may be changed at any point without it being considered a breaking change.

The window at a given row will include the row itself, and the window_size - 1 elements before it.

Parameters:
window_size

Integer size of the rolling window.

fisherbool, optional

If True, Fisher’s definition is used (normal ==> 0.0). If False, Pearson’s definition is used (normal ==> 3.0).

biasbool, optional

If False, the calculations are corrected for statistical bias.

min_samples

The number of values in the window that should be non-null before computing a result. If set to None (default), it will be set equal to window_size.

center

Set the labels at the center of the window.

See also

Series.kurtosis

Examples

>>> pl.Series([1, 4, 2, 9]).rolling_kurtosis(3)
shape: (4,)
Series: '' [f64]
[
    null
    null
    -1.5
    -1.5
]