Skip to content

Commit

Permalink
DOC: Add 'See Also' and 'Parameters' for pandas.api.indexers.Variable…
Browse files Browse the repository at this point in the history
…OffsetWindowIndexer (#59377)

Add 'See Also' and 'Parameters'

Add 'See Also' and 'Parameters' for VariableOffsetWindowIndexer

Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com>
  • Loading branch information
ivonastojanovic and mroeschke authored Aug 5, 2024
1 parent 3b447d6 commit 772fbc0
Show file tree
Hide file tree
Showing 2 changed files with 25 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 @@ -263,7 +263,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.VariableOffsetWindowIndexer PR01,SA01" \
-i "pandas.api.interchange.from_dataframe RT03,SA01" \
-i "pandas.api.types.is_bool PR01,SA01" \
-i "pandas.api.types.is_bool_dtype SA01" \
Expand Down
25 changes: 25 additions & 0 deletions pandas/core/indexers/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,31 @@ class VariableOffsetWindowIndexer(BaseIndexer):
"""
Calculate window boundaries based on a non-fixed offset such as a BusinessDay.
Parameters
----------
index_array : np.ndarray, default 0
Array-like structure specifying the indices for data points.
This parameter is currently not used.
window_size : int, optional, default 0
Specifies the number of data points in each window.
This parameter is currently not used.
index : DatetimeIndex, optional
``DatetimeIndex`` of the labels of each observation.
offset : BaseOffset, optional
``DateOffset`` representing the size of the window.
**kwargs
Additional keyword arguments passed to the parent class ``BaseIndexer``.
See Also
--------
api.indexers.BaseIndexer : Base class for all indexers.
DataFrame.rolling : Rolling window calculations on DataFrames.
offsets : Module providing various time offset classes.
Examples
--------
>>> from pandas.api.indexers import VariableOffsetWindowIndexer
Expand Down

0 comments on commit 772fbc0

Please sign in to comment.