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

Conversation

Aadharsh-Acharya
Copy link
Contributor

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

@Aadharsh-Acharya
Copy link
Contributor Author

Does this look better?

@phofl
Copy link
Member

phofl commented Apr 22, 2022

Yes, could you parametrize over the nullable dtypes?

pre-commit seems to be failing

@Aadharsh-Acharya
Copy link
Contributor Author

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"])
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 use the any_int_dtype fixture instead?

@jreback jreback added the Testing pandas testing functions or related to the test suite label Apr 27, 2022
@jreback jreback added this to the 1.5 milestone Apr 27, 2022
@jreback jreback added the Numeric Operations Arithmetic, Comparison, and Logical operations label Apr 27, 2022
@github-actions
Copy link
Contributor

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.

@github-actions github-actions bot added the Stale label May 28, 2022
@mroeschke mroeschke merged commit aae9234 into pandas-dev:main Jun 3, 2022
@mroeschke
Copy link
Member

Thanks @Aadharsh-Acharya

yehoshuadimarsky pushed a commit to yehoshuadimarsky/pandas that referenced this pull request Jul 13, 2022
* 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Numeric Operations Arithmetic, Comparison, and Logical operations Stale Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dtype change when doing operations on dataframes
5 participants