-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
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
Conversation
Aadharsh-Acharya
commented
Apr 22, 2022
- closes dtype change when doing operations on dataframes #32822
- [1 Test added and passed]
- All [code checks passed]
s = Series([1, 2, np.nan], dtype='Int64') | ||
t = Series([1, 2, 3], dtype='Int64') | ||
|
||
expected = (s - t).dtype |
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 please validate the whole objects with tm.assert_series_equals and please use multiletter variables
Does this look better? |
Yes, could you parametrize over the nullable dtypes? pre-commit seems to be failing |
Absolutely, I appreciate the guidance! And I noticed the pre-commit issue, too. There seems to be a version issue on my local machine (between click and black), which isn't letting me check the pre-commit before committing the code. |
@@ -2006,6 +2006,16 @@ def test_bool_frame_mult_float(): | |||
tm.assert_frame_equal(result, expected) | |||
|
|||
|
|||
@pytest.mark.parametrize("d_type", ["int8", "int16", "int32", "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 the any_int_dtype
fixture instead?
This pull request is stale because it has been open for thirty days with no activity. Please update and respond to this comment if you're still interested in working on this. |
Thanks @Aadharsh-Acharya |
* TST: GH32822 data types in frame manip * edited style * parametrize dtype * fix integration tests * Rename test, use any_int_dtype fixture Co-authored-by: Aadharsh Acharya <[email protected]> Co-authored-by: Matthew Roeschke <[email protected]>