-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
TST: GH 27185 Test to check df with timedelta & Int NA sums correctly #47354
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
Conversation
df = DataFrame( | ||
{ | ||
"A": Series([1, 2, None], dtype="timedelta64[ns]"), | ||
"B": Series([1, 2, None], dtype="Int64"), |
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.
Could you use NaT and NA instead of None?
) | ||
|
||
result = df.sum() | ||
assert result["A"] == Timedelta(3, "ns") |
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.
Please check the whole result object
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.
Pushed new commit w/ the changes requested - let me know what you think!
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.
hey @phofl just checking in to see if there's anything I should update in the PR?
Thanks @aamnv |
…pandas-dev#47354) * TST: GH 27185 Adding test to check df with timedelta and int obj sums as expected * TST: updating the test with nan NaT and check whole object
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.Open to feedback on how to improve the PR - not sure if this is exactly what the original issue was looking for.