Skip to content

API: improve dtype in df.where with EA other #62038

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 10 commits into from
Aug 5, 2025

Conversation

jbrockmendel
Copy link
Member

@jbrockmendel jbrockmendel commented Aug 3, 2025

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Tests added and passed if fixing a bug or adding a new feature
  • All code checks passed.
  • Added type annotations to new arguments/methods/functions.
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.

Improves the patch-job done by #38742. Also makes the affected test robust to always-distinguish NAN-vs-NA behavior.

@mroeschke mroeschke added Dtype Conversions Unexpected or buggy dtype conversions Error Reporting Incorrect or improved errors from pandas labels Aug 4, 2025
@mroeschke mroeschke added this to the 3.0 milestone Aug 4, 2025
@mroeschke
Copy link
Member

Looks like 87d5fdf undid all your changes before

@jbrockmendel
Copy link
Member Author

Woops. Looks better now.

@jbrockmendel
Copy link
Member Author

ruff format.............................................................................................Failed
- hook id: ruff-format
- files were modified by this hook

Any idea how to make it tell me what it wants to change?

@mroeschke
Copy link
Member

You can comment pre-commit.ci autofix in this PR to get pre-commit to add a commit to fix it for you.

Otherwise if you have the pre-commit hooks installed, to show the fixes you'll probably need to add --show-fixes on this line

args: [--exit-non-zero-on-fix]

@jbrockmendel
Copy link
Member Author

running ruff format locally on the affected files says it leaves them unchanged

@mroeschke
Copy link
Member

What about running pre-commit run ruff --all-files? (Generally pre-commit run <id to check> is the source of truth for the linting checks)

@jbrockmendel
Copy link
Member Author

That did it, thanks. Lets see if the CI agrees

@jbrockmendel
Copy link
Member Author

Booyah, did it. Thanks for help troubleshooting

@mroeschke mroeschke merged commit 79cc01d into pandas-dev:main Aug 5, 2025
75 of 76 checks passed
@mroeschke
Copy link
Member

Np! Thanks @jbrockmendel

@jbrockmendel jbrockmendel deleted the bug-where-ea branch August 5, 2025 02:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dtype Conversions Unexpected or buggy dtype conversions Error Reporting Incorrect or improved errors from pandas
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants