Skip to content

Commit

Permalink
DOC: Enforce Numpy Docstring Validation for pandas.api.extensions.reg…
Browse files Browse the repository at this point in the history
…ister_extension_dtype (#58615)

* DOC: add PR01,SA01 for pandas.api.indexers.BaseIndexer

* DOC: remove PR01,SA01 for pandas.api.indexers.BaseIndexer
  • Loading branch information
tuhinsharma121 committed May 7, 2024
1 parent dd4b872 commit 9690809
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
1 change: 0 additions & 1 deletion ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.api.extensions.ExtensionArray.tolist RT03,SA01" \
-i "pandas.api.extensions.ExtensionArray.unique RT03,SA01" \
-i "pandas.api.extensions.ExtensionArray.view SA01" \
-i "pandas.api.indexers.BaseIndexer PR01,SA01" \
-i "pandas.api.indexers.FixedForwardWindowIndexer PR01,SA01" \
-i "pandas.api.indexers.VariableOffsetWindowIndexer PR01,SA01" \
-i "pandas.api.interchange.from_dataframe RT03,SA01" \
Expand Down
19 changes: 19 additions & 0 deletions pandas/core/indexers/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,25 @@ class BaseIndexer:
"""
Base class for window bounds calculations.
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 on dataframe.
Series.rolling : Provides rolling window calculations on series.
Examples
--------
>>> from pandas.api.indexers import BaseIndexer
Expand Down

0 comments on commit 9690809

Please sign in to comment.