Skip to content

Commit cc35787

Browse files
author
Kei
committed
Update tests
1 parent 59746e9 commit cc35787

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

pandas/tests/groupby/test_apply.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ def test_groupby_as_index_apply():
315315

316316
# apply doesn't maintain the original ordering
317317
# changed in GH5610 as the as_index=False returns a MI here
318-
exp_not_as_apply = MultiIndex.from_tuples([(0, 0), (0, 2), (1, 1), (2, 4)])
318+
exp_not_as_apply = Index([0, 1, 2, 4])
319319
tp = [(1, 0), (1, 2), (2, 1), (3, 4)]
320320
exp_as_apply = MultiIndex.from_tuples(tp, names=["user_id", None])
321321

pandas/tests/groupby/test_apply_mutate.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,7 @@ def fn(x):
9090
result = df.groupby(["col1"], as_index=False).apply(fn)
9191
expected = pd.Series(
9292
[1, 2, 0, 4, 5, 0],
93-
index=pd.MultiIndex.from_tuples(
94-
[(0, 0), (0, 1), (0, 2), (1, 3), (1, 4), (1, 5)]
95-
),
93+
index=range(6),
9694
name="col2",
9795
)
9896
tm.assert_series_equal(result, expected)

0 commit comments

Comments
 (0)