Skip to content

TST: GH32822 data types in frame manip #46836

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

Merged
merged 6 commits into from
Jun 3, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions pandas/tests/frame/test_arithmetic.py
Original file line number Diff line number Diff line change
Expand Up @@ -2040,3 +2040,13 @@ def _constructor_sliced(self):

result = sdf + sdf
tm.assert_frame_equal(result, expected)


def test_frame_sub_dtype():
# GH 32822
s = Series([1, 2, np.nan], dtype='Int64')
t = Series([1, 2, 3], dtype='Int64')

expected = (s - t).dtype
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please validate the whole objects with tm.assert_series_equals and please use multiletter variables

result = (s.to_frame() - t.to_frame())[0].dtype
assert expected is result