Skip to content

REF: share astype exception messages #49655

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 2 commits into from
Nov 16, 2022

Conversation

jbrockmendel
Copy link
Member

  • 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.

@jbrockmendel jbrockmendel added Refactor Internal refactoring of code Astype labels Nov 14, 2022
# invalid input to is_bool_dtype
pass
if is_bool_dtype(cast_type):
raise ValueError(f"Bool column has NA values in column {c}")
Copy link
Member

Choose a reason for hiding this comment

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

So are there new user-facing paths where this is raised now?

Copy link
Member Author

Choose a reason for hiding this comment

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

not AFAICT. the except (AttributeError, TypeError): this removes should be un-reachable

@mroeschke mroeschke added this to the 2.0 milestone Nov 16, 2022
@mroeschke mroeschke merged commit ec5b62e into pandas-dev:main Nov 16, 2022
@mroeschke
Copy link
Member

Thanks @jbrockmendel

@jbrockmendel jbrockmendel deleted the api-index-astype-2 branch November 16, 2022 22:51
MarcoGorelli pushed a commit to MarcoGorelli/pandas that referenced this pull request Nov 18, 2022
* REF: share astype exception messages

* mypy fixup
mliu08 pushed a commit to mliu08/pandas that referenced this pull request Nov 27, 2022
* REF: share astype exception messages

* mypy fixup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Astype Refactor Internal refactoring of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants