Skip to content

Commit

Permalink
Changed to hardcode
Browse files Browse the repository at this point in the history
  • Loading branch information
ccccjone committed Dec 9, 2023
1 parent 66e50f6 commit 96bf104
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions pandas/tests/groupby/test_reductions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1059,25 +1059,25 @@ def test_regression_allowlist_methods(op, axis, skipna, sort):
tm.assert_frame_equal(result, expected)


def test_prod_groupby_consistency_values():
def test_groupby_prod_with_int64_dtype():
# GH#46573
data = [
[1, 10],
[1, 21],
[1, 32],
[1, 43],
[1, 54],
[1, 67],
[1, 78],
[1, 89],
[1, 5],
[1, 11],
[1, 41],
[1, 17],
[1, 37],
[1, 7],
[1, 29],
[1, 31],
[1, 2],
[1, 3],
[1, 43],
[1, 5],
[1, 47],
[1, 99],
[1, 101],
[1, 19],
[1, 88],
]
df = DataFrame(data, columns=["A", "B"])
df = DataFrame(data, columns=["A", "B"], dtype="int64")
result = df.groupby(["A"]).prod().reset_index()
expected = DataFrame([df.prod()], columns=df.columns)
expected = DataFrame({"A": [1], "B": [180970905912331920]}, dtype="int64")
tm.assert_frame_equal(result, expected)

0 comments on commit 96bf104

Please sign in to comment.