Skip to content

Commit 03f2d3b

Browse files
committed
STY: fix period and indentation issues
1 parent e1bfbda commit 03f2d3b

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

pandas/core/window/rolling.py

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2205,7 +2205,7 @@ def apply(
22052205
* ``'numba'`` : Runs rolling apply through JIT compiled code from numba.
22062206
Only available when ``raw`` is set to ``True``.
22072207
* ``None`` : Defaults to ``'cython'`` or
2208-
globally setting ``compute.use_numba``
2208+
globally setting ``compute.use_numba``.
22092209
22102210
engine_kwargs : dict, default None
22112211
* For ``'cython'`` engine, there are no accepted ``engine_kwargs``
@@ -2290,7 +2290,7 @@ def pipe(
22902290
>>> g = lambda x, arg1: x * 5 / arg1
22912291
>>> f = lambda x: x**4
22922292
>>> df = pd.DataFrame({'A': [1, 2, 3, 4]},
2293-
index=pd.date_range('2012-08-02', periods=4))
2293+
index=pd.date_range('2012-08-02', periods=4))
22942294
>>> h(g(f(df.rolling("2D")), arg1=1), arg2=2, arg3=3) # doctest: +SKIP
22952295
22962296
You can write
@@ -2328,31 +2328,31 @@ def pipe(
23282328
Notes
23292329
-----
23302330
See more `here
2331-
<https://pandas.pydata.org/pandas-docs/stable/user_guide/groupby.html#piping-function-calls>`_
2331+
<https://pandas.pydata.org/pandas-docs/stable/user_guide/groupby.html#piping-function-calls>`__.
23322332
23332333
Examples
23342334
--------
23352335
2336-
>>> df = pd.DataFrame(
2337-
... {"A": [1, 2, 3, 4]}, index=pd.date_range("2012-08-02", periods=4)
2338-
... )
2339-
>>> df
2340-
A
2341-
2012-08-02 1
2342-
2012-08-03 2
2343-
2012-08-04 3
2344-
2012-08-05 4
2345-
2346-
To get the difference between each rolling
2347-
2-day window's maximum and minimum
2348-
value in one pass, you can do
2349-
2350-
>>> df.rolling("2D").pipe(lambda x: x.max() - x.min())
2351-
A
2352-
2012-08-02 0.0
2353-
2012-08-03 1.0
2354-
2012-08-04 1.0
2355-
2012-08-05 1.0
2336+
>>> df = pd.DataFrame(
2337+
... {"A": [1, 2, 3, 4]}, index=pd.date_range("2012-08-02", periods=4)
2338+
... )
2339+
>>> df
2340+
A
2341+
2012-08-02 1
2342+
2012-08-03 2
2343+
2012-08-04 3
2344+
2012-08-05 4
2345+
2346+
To get the difference between each rolling
2347+
2-day window's maximum and minimum
2348+
value in one pass, you can do
2349+
2350+
>>> df.rolling("2D").pipe(lambda x: x.max() - x.min())
2351+
A
2352+
2012-08-02 0.0
2353+
2012-08-03 1.0
2354+
2012-08-04 1.0
2355+
2012-08-05 1.0
23562356
"""
23572357
return super().pipe(func, *args, **kwargs)
23582358

@@ -2385,7 +2385,7 @@ def sum(
23852385
* For ``'numba'`` engine, the engine can accept ``nopython``, ``nogil``
23862386
and ``parallel`` dictionary keys. The values must either be ``True`` or
23872387
``False``. The default ``engine_kwargs`` for the ``'numba'`` engine is
2388-
``{'nopython': True, 'nogil': False, 'parallel': False}``
2388+
``{'nopython': True, 'nogil': False, 'parallel': False}``.
23892389
23902390
.. versionadded:: 1.3.0
23912391
@@ -2495,7 +2495,7 @@ def max(
24952495
``False``.
24962496
24972497
The default ``engine_kwargs`` for the ``'numba'`` engine is
2498-
``{'nopython': True, 'nogil': False, 'parallel': False}``
2498+
``{'nopython': True, 'nogil': False, 'parallel': False}``.
24992499
25002500
.. versionadded:: 1.3.0
25012501
@@ -2567,7 +2567,7 @@ def min(
25672567
``False``.
25682568
25692569
The default ``engine_kwargs`` for the ``'numba'`` engine is
2570-
``{'nopython': True, 'nogil': False, 'parallel': False}``
2570+
``{'nopython': True, 'nogil': False, 'parallel': False}``.
25712571
25722572
.. versionadded:: 1.3.0
25732573
@@ -2639,7 +2639,7 @@ def mean(
26392639
``False``.
26402640
26412641
The default ``engine_kwargs`` for the ``'numba'`` engine is
2642-
``{'nopython': True, 'nogil': False, 'parallel': False}``
2642+
``{'nopython': True, 'nogil': False, 'parallel': False}``.
26432643
26442644
.. versionadded:: 1.3.0
26452645
@@ -2718,7 +2718,7 @@ def median(
27182718
``False``.
27192719
27202720
The default ``engine_kwargs`` for the ``'numba'`` engine is
2721-
``{'nopython': True, 'nogil': False, 'parallel': False}``
2721+
``{'nopython': True, 'nogil': False, 'parallel': False}``.
27222722
27232723
.. versionadded:: 1.3.0
27242724
@@ -2795,7 +2795,7 @@ def std(
27952795
``False``.
27962796
27972797
The default ``engine_kwargs`` for the ``'numba'`` engine is
2798-
``{'nopython': True, 'nogil': False, 'parallel': False}``
2798+
``{'nopython': True, 'nogil': False, 'parallel': False}``.
27992799
28002800
.. versionadded:: 1.4.0
28012801
@@ -2875,7 +2875,7 @@ def var(
28752875
``False``.
28762876
28772877
The default ``engine_kwargs`` for the ``'numba'`` engine is
2878-
``{'nopython': True, 'nogil': False, 'parallel': False}``
2878+
``{'nopython': True, 'nogil': False, 'parallel': False}``.
28792879
28802880
.. versionadded:: 1.4.0
28812881

0 commit comments

Comments
 (0)