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

enhancement: Added 'errors=coerce' option in astype() #49042

Closed

Conversation

subbusainath
Copy link

Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

tests always

Copy link
Member

@mroeschke mroeschke left a 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

@mroeschke
Copy link
Member

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.

@mroeschke mroeschke closed this Oct 12, 2022
@subbusainath
Copy link
Author

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!

@mroeschke
Copy link
Member

We would still be open to this enhancement given more support and discussion in #48781 first.

@mroeschke
Copy link
Member

Actually to stimulate discussion, I'll reopen this PR, sorry.

@mroeschke mroeschke reopened this Oct 12, 2022
@@ -0,0 +1,58 @@
.. _whatsnew_161:
Copy link
Member

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
Copy link
Member

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"?

@github-actions
Copy link
Contributor

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 Nov 12, 2022
@mroeschke
Copy link
Member

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

@mroeschke mroeschke closed this Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ENH: add errors='coerce' to DataFrame.astype
4 participants