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: ne comparison returns False for NA and other value #56123

Merged
merged 5 commits into from Dec 7, 2023

Conversation

phofl
Copy link
Member

@phofl phofl commented Nov 22, 2023

returning True here makes more sense than False for !=

@phofl phofl added Strings String extension data type and string data Arrow pyarrow functionality labels Nov 22, 2023
@phofl phofl added this to the 2.1.4 milestone Nov 22, 2023
@@ -663,7 +664,10 @@ def _convert_int_dtype(self, result):

def _cmp_method(self, other, op):
result = super()._cmp_method(other, op)
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be fixed in the ArrowExtensionArray._cmp_method?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, the arrow dtypes will return an arrow array with bool dtype that has NA values in those places, which is correct, this fix is to emulate object dtype

@mroeschke
Copy link
Member

pre-commit.ci autofix

@mroeschke mroeschke merged commit c369d93 into pandas-dev:main Dec 7, 2023
44 checks passed
@mroeschke
Copy link
Member

Thanks @phofl

Copy link

lumberbot-app bot commented Dec 7, 2023

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
git checkout 2.1.x
git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
git cherry-pick -x -m1 c369d93cf7c82455bd3dd98233c7c09d8c567025
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #56123: BUG: ne comparison returns False for NA and other value'
  1. Push to a named branch:
git push YOURFORK 2.1.x:auto-backport-of-pr-56123-on-2.1.x
  1. Create a PR against branch 2.1.x, I would have named this PR:

"Backport PR #56123 on branch 2.1.x (BUG: ne comparison returns False for NA and other value)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the Still Needs Manual Backport label once the PR gets merged.

If these instructions are inaccurate, feel free to suggest an improvement.

phofl added a commit to phofl/pandas that referenced this pull request Dec 7, 2023
…6123)

* BUG: ne comparison returns False for NA and other value

* Fix

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: Thomas Li <47963215+lithomas1@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

(cherry picked from commit c369d93)
phofl added a commit that referenced this pull request Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arrow pyarrow functionality Strings String extension data type and string data
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants