You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/source/user_guide/computation.rst
+15-1Lines changed: 15 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -561,7 +561,7 @@ For example, if we have the following ``DataFrame``:
561
561
df
562
562
563
563
and we want to use an expanding window where ``use_expanding`` is ``True`` otherwise a window of size
564
-
1, we can create the following ``BaseIndexer``:
564
+
1, we can create the following ``BaseIndexer`` subclass:
565
565
566
566
.. code-block:: ipython
567
567
@@ -593,8 +593,22 @@ and we want to use an expanding window where ``use_expanding`` is ``True`` other
593
593
3 3.0
594
594
4 10.0
595
595
596
+
You can view other examples of ``BaseIndexer`` subclasses `here <https://github.com/pandas-dev/pandas/blob/master/pandas/core/window/indexers.py>`__
597
+
596
598
.. versionadded:: 1.1
597
599
600
+
One subclass of note within those examples is the ``VariableOffsetWindowIndexer`` that allows
601
+
rolling operations over a non-fixed offset like a ``BusinessDay``.
602
+
603
+
.. ipython:: python
604
+
605
+
from pandas.api.indexers import VariableOffsetWindowIndexer
0 commit comments