Skip to content

Commit f499d64

Browse files
DOC: Enforce Numpy Docstring Validation for pandas.api.indexers.FixedForwardWindowIndexer (#58652)
* DOC: add PR01,SA01 for pandas.api.indexers.FixedForwardWindowIndexer * DOC: add PR01,SA01 for pandas.api.indexers.FixedForwardWindowIndexer * DOC: remove PR01,SA01 for pandas.api.indexers.FixedForwardWindowIndexer
1 parent d62d77b commit f499d64

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

ci/code_checks.sh

-1
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
361361
-i "pandas.api.extensions.ExtensionArray.tolist RT03,SA01" \
362362
-i "pandas.api.extensions.ExtensionArray.unique RT03,SA01" \
363363
-i "pandas.api.extensions.ExtensionArray.view SA01" \
364-
-i "pandas.api.indexers.FixedForwardWindowIndexer PR01,SA01" \
365364
-i "pandas.api.indexers.VariableOffsetWindowIndexer PR01,SA01" \
366365
-i "pandas.api.interchange.from_dataframe RT03,SA01" \
367366
-i "pandas.api.types.infer_dtype PR07,SA01" \

pandas/core/indexers/objects.py

+20
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,26 @@ class FixedForwardWindowIndexer(BaseIndexer):
315315
"""
316316
Creates window boundaries for fixed-length windows that include the current row.
317317
318+
Parameters
319+
----------
320+
index_array : np.ndarray, default None
321+
Array-like structure representing the indices for the data points.
322+
If None, the default indices are assumed. This can be useful for
323+
handling non-uniform indices in data, such as in time series
324+
with irregular timestamps.
325+
window_size : int, default 0
326+
Size of the moving window. This is the number of observations used
327+
for calculating the statistic. The default is to consider all
328+
observations within the window.
329+
**kwargs
330+
Additional keyword arguments passed to the subclass's methods.
331+
332+
See Also
333+
--------
334+
DataFrame.rolling : Provides rolling window calculations.
335+
api.indexers.VariableWindowIndexer : Calculate window bounds based on
336+
variable-sized windows.
337+
318338
Examples
319339
--------
320340
>>> df = pd.DataFrame({"B": [0, 1, 2, np.nan, 4]})

0 commit comments

Comments
 (0)