@@ -167,6 +167,32 @@ class VariableOffsetWindowIndexer(BaseIndexer):
167
167
"""
168
168
Calculate window boundaries based on a non-fixed offset such as a BusinessDay.
169
169
170
+ Parameters
171
+ ----------
172
+ index_array : np.ndarray, default 0
173
+ Array-like structure specifying the indices for data points.
174
+ If not provided, the default index is used. This parameter is
175
+ especially useful for handling datasets with non-uniform or
176
+ irregular indices.
177
+
178
+ window_size : int, optional, default 0
179
+ Specifies the number of data points in each window.
180
+ A value of 0 means the window size is determined dynamically
181
+ based on the provided `offset` and `index`.
182
+
183
+ index : DatetimeIndex, optional
184
+ The time index that dictates the window boundaries.
185
+ This should be a `DatetimeIndex` which aligns with the temporal
186
+ nature of the data.
187
+
188
+ offset : BaseOffset, optional
189
+ A pandas offset object used to calculate the window boundaries.
190
+ It defines the time-based offset that adjusts the size and
191
+ position of the windows.
192
+
193
+ **kwargs
194
+ Additional keyword arguments passed to the parent class `BaseIndexer`.
195
+
170
196
Examples
171
197
--------
172
198
>>> from pandas.api.indexers import VariableOffsetWindowIndexer
@@ -197,6 +223,12 @@ class VariableOffsetWindowIndexer(BaseIndexer):
197
223
2020-01-08 7.0
198
224
2020-01-09 8.0
199
225
2020-01-10 9.0
226
+
227
+ See Also
228
+ --------
229
+ pandas.api.indexers.BaseIndexer : Base class for all indexers.
230
+ pandas.DataFrame.rolling : Rolling window calculations on DataFrames.
231
+ pandas.offsets : Module providing various time offset classes.
200
232
"""
201
233
202
234
def __init__ (
0 commit comments