From aca9f17be9221df3aedbb7554e452e0de15f3e41 Mon Sep 17 00:00:00 2001 From: tuhinsharma121 Date: Thu, 9 May 2024 19:52:57 +0530 Subject: [PATCH] DOC: add PR01,SA01 for pandas.api.indexers.FixedForwardWindowIndexer --- pandas/core/indexers/objects.py | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/pandas/core/indexers/objects.py b/pandas/core/indexers/objects.py index 6785d4ea28f9a..083e86500a210 100644 --- a/pandas/core/indexers/objects.py +++ b/pandas/core/indexers/objects.py @@ -313,7 +313,27 @@ def get_window_bounds( class FixedForwardWindowIndexer(BaseIndexer): """ - Create window boundaries for fixed-length windows that include the current row. + Creates window boundaries for fixed-length windows that include the current row. + + Parameters + ---------- + index_array : np.ndarray, default None + Array-like structure representing the indices for the data points. + If None, the default indices are assumed. This can be useful for + handling non-uniform indices in data, such as in time series + with irregular timestamps. + window_size : int, default 0 + Size of the moving window. This is the number of observations used + for calculating the statistic. The default is to consider all + observations within the window. + **kwargs + Additional keyword arguments passed to the subclass's methods. + + See Also + -------- + DataFrame.rolling : Provides rolling window calculations. + api.indexers.VariableWindowIndexer : Calculate window bounds based on + variable-sized windows. Examples --------