polars.Expr.rolling_skew
-
Compute a rolling skew.
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 - 1elements before it.- Parameters:
-
- window_size
-
Integer size of the rolling window.
- bias
-
- If False, the calculations are corrected for statistical bias.
-
bias: bool = True,
- 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 towindow_size. - center
-
Set the labels at the center of the window.
See also
Examples
>>> df = pl.DataFrame({"a": [1, 4, 2, 9]}) >>> df.select(pl.col("a").rolling_skew(3)) shape: (4, 1) ┌──────────┐ │ a │ │ --- │ │ f64 │ ╞══════════╡ │ null │ │ null │ │ 0.381802 │ │ 0.47033 │ └──────────┘Note how the values match the following:
>>> pl.Series([1, 4, 2]).skew(), pl.Series([4, 2, 9]).skew() (0.38180177416060584, 0.47033046033698594)
Expr.rolling_skew(
window_size: int,
*,
bias: bool = True,
min_samples: int | None = None,
center: bool = False,
) → Expr
© 2020 Ritchie Vink
© 2022 Polars contributors
Licensed under the MIT License.
https://docs.pola.rs/api/python/stable/reference/expressions/api/polars.Expr.rolling_skew.html