Skip to content

Commit 652fed4

Browse files
committed
DOC: Add some suggested changes.
From pull request (pandas-dev#39091): pandas-dev#39091 - remove noqa - change line back to single quotes - rename df1 to reversed_df
1 parent 462636f commit 652fed4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/source/user_guide/window.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ be calculated with :meth:`~Rolling.apply` by specifying a separate column of wei
9999
df = pd.DataFrame([[1, 2, 0.6], [2, 3, 0.4], [3, 4, 0.2], [4, 5, 0.7]])
100100
df.rolling(2, method="table", min_periods=0).apply(
101101
weighted_mean, raw=True, engine="numba"
102-
) # noqa:E501
102+
)
103103
104104
105105
All windowing operations support a ``min_periods`` argument that dictates the minimum amount of
@@ -135,7 +135,7 @@ time based index must be monotonic.
135135

136136
.. ipython:: python
137137
138-
times = ["2020-01-01", "2020-01-03", "2020-01-04", "2020-01-05", "2020-01-29"]
138+
times = ['2020-01-01', '2020-01-03', '2020-01-04', '2020-01-05', '2020-01-29']
139139
s = pd.Series(range(5), index=pd.DatetimeIndex(times))
140140
s
141141
# Window with 2 observations
@@ -224,8 +224,8 @@ as shown in example below:
224224
).set_index("time")
225225
df
226226
227-
df1 = df[::-1].rolling("2s").sum()[::-1]
228-
df1
227+
reversed_df = df[::-1].rolling("2s").sum()[::-1]
228+
reversed_df
229229
230230
Or we can also do it using FixedForwardWindowIndexer which basically Creates window boundaries
231231
for fixed-length windows that include the current row.

0 commit comments

Comments
 (0)