-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TST: Added a test for groupby.prod #56384
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
[1, multiplier], | ||
] | ||
df = DataFrame(data, columns=["A", "B"]) | ||
df_prod = DataFrame([df.prod()], columns=df.columns) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you hardcode this instead (assuming the parametrization will be removed)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By "hardcode", I mean something like expected = DataFrame([[12345], [6789]], columns["B"])
. In other words, don't use df.prod()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rhshadrach Sorry for the misunderstanding. I have now updated the code based on your explanation. Could you please take a look and let me know if this is now correct, or if there are any further modifications needed? Thanks for your kind assistance.
Hi @rhshadrach , thank you for your review and suggestions. I have updated the code based on your feedback. Please review. Appreciate your help and guidance! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Thanks @ccccjone! |
Closes BUG: prod and groupby.prod behave differently #46573
The bug related to issue BUG: prod and groupby.prod behave differently #46573 has been fixed in the current version.
Added a test related to this issue. The test is designed to check if
groupby.prod
returns the same results asprod
.