From 941d32baa791b3480a96b1d198fcd4f8e9941036 Mon Sep 17 00:00:00 2001 From: Marco Gorelli <33491632+MarcoGorelli@users.noreply.github.com> Date: Sun, 10 Nov 2024 09:25:46 +0000 Subject: [PATCH] docs: update `by` docs for rolling_*_by functions --- py-polars/polars/expr/expr.py | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/py-polars/polars/expr/expr.py b/py-polars/polars/expr/expr.py index e5fe2450e73e..e097819c50bb 100644 --- a/py-polars/polars/expr/expr.py +++ b/py-polars/polars/expr/expr.py @@ -6200,7 +6200,8 @@ def rolling_min_by( Parameters ---------- by - This column must be of dtype Datetime or Date. + Should be ``DateTime``, ``Date``, ``UInt64``, ``UInt32``, ``Int64``, + or ``Int32`` data type. window_size The length of the window. Can be a dynamic temporal size indicated by a timedelta or the following string language: @@ -6322,7 +6323,8 @@ def rolling_max_by( Parameters ---------- by - This column must be of dtype Datetime or Date. + Should be ``DateTime``, ``Date``, ``UInt64``, ``UInt32``, ``Int64``, + or ``Int32`` data type. window_size The length of the window. Can be a dynamic temporal size indicated by a timedelta or the following string language: @@ -6470,7 +6472,8 @@ def rolling_mean_by( Parameters ---------- by - This column must be of dtype Datetime or Date. + Should be ``DateTime``, ``Date``, ``UInt64``, ``UInt32``, ``Int64``, + or ``Int32`` data type. window_size The length of the window. Can be a dynamic temporal size indicated by a timedelta or the following string language: @@ -6649,7 +6652,8 @@ def rolling_sum_by( The number of values in the window that should be non-null before computing a result. by - This column must of dtype `{Date, Datetime}` + Should be ``DateTime``, ``Date``, ``UInt64``, ``UInt32``, ``Int64``, + or ``Int32`` data type. closed : {'left', 'right', 'both', 'none'} Define which sides of the temporal interval are closed (inclusive), defaults to `'right'`. @@ -6774,7 +6778,8 @@ def rolling_std_by( Parameters ---------- by - This column must be of dtype Datetime or Date. + Should be ``DateTime``, ``Date``, ``UInt64``, ``UInt32``, ``Int64``, + or ``Int32`` data type. window_size The length of the window. Can be a dynamic temporal size indicated by a timedelta or the following string language: @@ -6931,7 +6936,8 @@ def rolling_var_by( Parameters ---------- by - This column must be of dtype Datetime or Date. + Should be ``DateTime``, ``Date``, ``UInt64``, ``UInt32``, ``Int64``, + or ``Int32`` data type. window_size The length of the window. Can be a dynamic temporal size indicated by a timedelta or the following string language: @@ -7087,7 +7093,8 @@ def rolling_median_by( Parameters ---------- by - This column must be of dtype Datetime or Date. + Should be ``DateTime``, ``Date``, ``UInt64``, ``UInt32``, ``Int64``, + or ``Int32`` data type. window_size The length of the window. Can be a dynamic temporal size indicated by a timedelta or the following string language: @@ -7213,7 +7220,8 @@ def rolling_quantile_by( Parameters ---------- by - This column must be of dtype Datetime or Date. + Should be ``DateTime``, ``Date``, ``UInt64``, ``UInt32``, ``Int64``, + or ``Int32`` data type. quantile Quantile between 0.0 and 1.0. interpolation : {'nearest', 'higher', 'lower', 'midpoint', 'linear'}