Skip to content
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: Fix comparison between nullable int and string #28945

Merged
merged 22 commits into from
Dec 10, 2019
Merged

BUG: Fix comparison between nullable int and string #28945

merged 22 commits into from
Dec 10, 2019

Conversation

dsaxton
Copy link
Member

@dsaxton dsaxton commented Oct 12, 2019

@jbrockmendel
Copy link
Member

The fix here makes sense. Are there any other types we could compare against that this fixes? e.g. arr == datetime.now()?

@TomAugspurger
Copy link
Contributor

Merging master should fix the CI failures.

pandas/tests/extension/test_integer.py Show resolved Hide resolved
pandas/tests/extension/test_integer.py Outdated Show resolved Hide resolved
@jreback jreback added Compat pandas objects compatability with Numpy or Python functions ExtensionArray Extending pandas with custom dtypes or arrays. labels Oct 16, 2019
@dsaxton
Copy link
Member Author

dsaxton commented Oct 17, 2019

The CI failures seem to be from tests on cummin and cummax for Series with datetime64 and timedelta64 dtypes

Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

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

minor comment on test but otherwise lgtm

pandas/tests/extension/test_integer.py Show resolved Hide resolved
@WillAyd WillAyd added this to the 1.0 milestone Oct 22, 2019
pandas/conftest.py Outdated Show resolved Hide resolved
@WillAyd
Copy link
Member

WillAyd commented Nov 19, 2019

@dsaxton can you fix up merge conflict?

Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

small change, pls merge master and ping on green.

@@ -652,7 +653,13 @@ def cmp_method(self, other):
with warnings.catch_warnings():
warnings.filterwarnings("ignore", "elementwise", FutureWarning)
with np.errstate(all="ignore"):
result = op(self._data, other)
method = getattr(
self._data, "__{op_name}__".format(op_name=op_name)
Copy link
Contributor

Choose a reason for hiding this comment

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

can you change this to a f-string

@jreback jreback merged commit 8705aad into pandas-dev:master Dec 10, 2019
@jreback
Copy link
Contributor

jreback commented Dec 10, 2019

thanks @dsaxton

@dsaxton
Copy link
Member Author

dsaxton commented Dec 11, 2019

thanks @dsaxton

NP, thanks for the review

@dsaxton dsaxton deleted the comp-null branch December 11, 2019 00:49
@jorisvandenbossche jorisvandenbossche added Bug and removed Compat pandas objects compatability with Numpy or Python functions labels Dec 11, 2019
proost pushed a commit to proost/pandas that referenced this pull request Dec 19, 2019
proost pushed a commit to proost/pandas that referenced this pull request Dec 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug ExtensionArray Extending pandas with custom dtypes or arrays.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Comparison to string is broken for nullable int
6 participants