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

TST (string dtype): resolve all infer_string TODO/xfails in pandas/tests/arrays #59686

Conversation

jorisvandenbossche
Copy link
Member

Together with the test changes in #59678 and #59682, this PR then resolves the remaining infer_string TODO or xfails in pandas/tests/arrays

xref #54792

@jorisvandenbossche jorisvandenbossche added the Strings String extension data type and string data label Sep 2, 2024
name, skipna=skipna, keepdims=keepdims, **kwargs
)
if keepdims:
# ArrowExtensionArray will return a length-1 bool[pyarrow] array
return result.astype(np.bool_)
Copy link
Member

Choose a reason for hiding this comment

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

is there a chance of having NAs here?

Copy link
Member

Choose a reason for hiding this comment

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

other than this, LGTM

Copy link
Member Author

Choose a reason for hiding this comment

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

I think not. So with the default of skipna=True, we skip missing values and AFAIK the result is never a NaN (because for empty the result is True/False for all/any).
And for the case of skipna=False, we are still in the "NaN-semantics" branch, where we do not use Kleene logic but regard missing values as Trues.

Copy link
Contributor

github-actions bot commented Oct 7, 2024

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 Oct 7, 2024
@jorisvandenbossche jorisvandenbossche added this to the 2.3 milestone Oct 10, 2024
@jorisvandenbossche jorisvandenbossche marked this pull request as ready for review October 10, 2024 13:19
@jorisvandenbossche jorisvandenbossche merged commit 4f328f0 into pandas-dev:main Oct 10, 2024
51 checks passed
@jorisvandenbossche jorisvandenbossche deleted the string-dtype-tests-arrays branch October 10, 2024 13:19
Copy link

lumberbot-app bot commented Oct 10, 2024

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.3.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 4f328f08df90906198b3a3f955ab321018964f0a
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
git commit -am 'Backport PR #59686: TST (string dtype): resolve all infer_string TODO/xfails in pandas/tests/arrays'
  1. Push to a named branch:
git push YOURFORK 2.3.x:auto-backport-of-pr-59686-on-2.3.x
  1. Create a PR against branch 2.3.x, I would have named this PR:

"Backport PR #59686 on branch 2.3.x (TST (string dtype): resolve all infer_string TODO/xfails in pandas/tests/arrays)"

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.

@jorisvandenbossche
Copy link
Member Author

Manual backport: #60020

jorisvandenbossche added a commit that referenced this pull request Oct 11, 2024
…ails in pandas/tests/arrays (#59686) (#60020)

TST (string dtype): resolve all infer_string TODO/xfails in pandas/tests/arrays (#59686)

(cherry picked from commit 4f328f0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported Strings String extension data type and string data
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants