Skip to content

Commit 4b1b051

Browse files
committed
ruff checks
1 parent cd2c7a5 commit 4b1b051

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

pandas/core/groupby/groupby.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -3848,7 +3848,7 @@ def ewm(self, *args, **kwargs) -> ExponentialMovingWindowGroupby:
38483848
One and only one of ``com``, ``span``, ``halflife``, or ``alpha`` must
38493849
be provided.
38503850
alpha : float, optional
3851-
Specify the smoothing factor :math:`\\alpha` directly,
3851+
Specify the smoothing factor :math:`\\alpha` directly,
38523852
where :math:`0 < \\alpha \\leq 1`.
38533853
One and only one of ``com``, ``span``, ``halflife``, or ``alpha`` must
38543854
be provided.
@@ -3876,8 +3876,8 @@ def ewm(self, *args, **kwargs) -> ExponentialMovingWindowGroupby:
38763876
-----
38773877
Each group is treated independently, and the exponential weighted calculations
38783878
are applied separately to each group.
3879-
When ``adjust=True``, weighted averages are calculated using weights
3880-
:math:`w_i = (1-\\alpha)^i` where :math:`i` is the number of periods from the
3879+
When ``adjust=True``, weighted averages are calculated using weights
3880+
:math:`w_i = (1-\\alpha)^i` where :math:`i` is the number of periods from the
38813881
observations being weighted to the current period.
38823882
When ``adjust=False``, the calculation follows the recursive formula:
38833883
:math:`y_t = (1 - \\alpha) y_{t-1} + \\alpha x_t`.

pandas/tests/frame/test_query_eval.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ def test_query_duplicate_column_name(self, engine, parser):
168168
}
169169
).rename(columns={"B": "A"})
170170

171-
res = df.query('C == 1', engine=engine, parser=parser)
171+
res = df.query("C == 1", engine=engine, parser=parser)
172172

173173
expect = DataFrame(
174174
[[1, 1, 1]],
@@ -1411,7 +1411,7 @@ def test_expr_with_column_name_with_backtick_and_hash(self):
14111411
def test_expr_with_column_name_with_backtick(self):
14121412
# GH 59285
14131413
df = DataFrame({"a`b": (1, 2, 3), "ab": (4, 5, 6)})
1414-
result = df.query("`a``b` < 2") # noqa
1414+
result = df.query("`a``b` < 2")
14151415
# Note: Formatting checks may wrongly consider the above ``inline code``.
14161416
expected = df[df["a`b"] < 2]
14171417
tm.assert_frame_equal(result, expected)

0 commit comments

Comments
 (0)