-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
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
enhancement: Added 'errors=coerce' option in astype() #49042
enhancement: Added 'errors=coerce' option in astype() #49042
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tests always
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the pull request. The original issue hasn't had much discussion or agreement from the core team, so I would recommend waiting until there's more consensus
Going to close for now pending the discussion in the original issue. Happy to have your thoughts in that issue if you are in support of this feature. |
Why didn't we moved this PR ? Since it does not have a huge enhancement in the astype method. I would like to add this enhancement feature into astype (). Which help us to solve the issue. I hope! |
We would still be open to this enhancement given more support and discussion in #48781 first. |
Actually to stimulate discussion, I'll reopen this PR, sorry. |
@@ -0,0 +1,58 @@ | |||
.. _whatsnew_161: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if accepted, this would go in the 1.6.0 file
@@ -302,6 +303,8 @@ def astype_array_safe( | |||
# trying to convert to float | |||
if errors == "ignore": | |||
new_values = values | |||
elif errors == "coerce": | |||
new_values = values |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how is this different from errors="ignore"
?
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. |
Thanks for the pull request, but it appears to have gone stale. Additionally this issue could use more discussion on the original issue before moving forward to closing to await resolution on the main issue |
doc/source/whatsnew/v1.6.1.rst
file if fixing a bug or adding a new feature.