-
-
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
BUG: Fixes pd.merge issue with columns of dtype numpy.uintc on windows #60145
Conversation
Added pytest test case to verify correct behavior with numpy.uintc dtype
"""To test if pd.merge works with numpy.uintc on windows""" | ||
|
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.
"""To test if pd.merge works with numpy.uintc on windows""" |
We don't use docstrings in our tests
def test_merge_with_uintc_columns(dataframes_with_uintc): | ||
"""To test if pd.merge works with numpy.uintc on windows""" | ||
|
||
df1 = pd.DataFrame({"a": ["foo", "bar"], "b": np.array([1, 2], dtype=np.uintc)}) |
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.
Do we have tests with np.intc
as well?
@@ -1843,6 +1843,20 @@ def test_merge_empty(self, left_empty, how, exp): | |||
|
|||
tm.assert_frame_equal(result, expected) | |||
|
|||
def test_merge_with_uintc_columns(dataframes_with_uintc): |
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.
def test_merge_with_uintc_columns(dataframes_with_uintc): | |
def test_merge_with_uintc_columns(): |
Looks like that fixture wasn't used
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 also add a whatsnew note in v3.0.0.rst
in the Reshaping
section?
…ile to make pandas namespace consistent
Hi @mroeschke , I have added the whatsnew note and included current issue #58713 and also issue #60091 as this PR fixes both of them. I have also added 2 more test cases which includes |
doc/source/whatsnew/v3.0.0.rst
Outdated
@@ -592,7 +592,6 @@ Performance improvements | |||
- Performance improvement in :meth:`RangeIndex.take` returning a :class:`RangeIndex` instead of a :class:`Index` when possible. (:issue:`57445`, :issue:`57752`) | |||
- Performance improvement in :func:`merge` if hash-join can be used (:issue:`57970`) | |||
- Performance improvement in :meth:`CategoricalDtype.update_dtype` when ``dtype`` is a :class:`CategoricalDtype` with non ``None`` categories and ordered (:issue:`59647`) | |||
- Performance improvement in :meth:`DataFrame.astype` when converting to extension floating dtypes, e.g. "Float64" (:issue:`60066`) |
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.
Don't think this should have been 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.
Sorry It accidentally got deleted while running a git command. Thank you for catching it
Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com>
Thanks @AbhishekChaudharii |
pandas-dev/pandas#60145 this has been fixed, but not released
pandas-dev/pandas#60145 this has been fixed, but not released
This PR fixes the issue encountered when using pd.merge with columns of dtype numpy.uintc on windows.
Added a relevant pytest case to validate correct behavior.
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.