Skip to content

Commit 31472ac

Browse files
committed
final fix
1 parent 2a8d1c1 commit 31472ac

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

pandas/core/groupby/groupby.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1308,7 +1308,7 @@ def _wrap_applied_output(
13081308
values: list,
13091309
not_indexed_same: bool = False,
13101310
is_transform: bool = False,
1311-
skip_as_index: bool = True,
1311+
skip_as_index: bool = False,
13121312
):
13131313
raise AbstractMethodError(self)
13141314

pandas/core/resample.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1370,7 +1370,7 @@ def func(x):
13701370
target_category=FutureWarning,
13711371
new_message=msg,
13721372
):
1373-
result = self._groupby.apply(func, skip_as_index=False)
1373+
result = self._groupby.apply(func, skip_as_index=True)
13741374
return self._wrap_result(result)
13751375

13761376
_upsample = _apply

pandas/tests/groupby/test_apply.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1444,7 +1444,9 @@ def test_apply_nonmonotonic_float_index(arg, idx):
14441444
tm.assert_frame_equal(result, expected)
14451445

14461446

1447-
@pytest.mark.parametrize("args, kwargs", [([True], {}), ([], {"numeric_only": True})])
1447+
@pytest.mark.parametrize(
1448+
"args, kwargs", [([False, True], {}), ([], {"numeric_only": True})]
1449+
)
14481450
def test_apply_str_with_args(df, args, kwargs):
14491451
# GH#46479
14501452
gb = df.groupby("A")

0 commit comments

Comments
 (0)