Skip to content

Implement safe_ea_cast to avoid catching Exception #29293

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

Conversation

jbrockmendel
Copy link
Member

instead of having except Exception in many places, we have it in one place, with one helpful comment

@gfyoung gfyoung added ExtensionArray Extending pandas with custom dtypes or arrays. Clean labels Oct 31, 2019
Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

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

Good idea!

@jbrockmendel
Copy link
Member Author

I think comments have been addressed. LMK if i missed anything

@jreback jreback added this to the 1.0 milestone Nov 2, 2019
@@ -32,6 +32,29 @@
_extension_array_shared_docs = dict() # type: Dict[str, str]


def try_cast_to_ea(cls_or_instance, obj, dtype=None):
Copy link
Contributor

Choose a reason for hiding this comment

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

if can type at some point

@jreback jreback merged commit e9046cc into pandas-dev:master Nov 2, 2019
@jreback
Copy link
Contributor

jreback commented Nov 2, 2019

thanks, small followon request.

@jbrockmendel jbrockmendel deleted the faster-ea branch November 2, 2019 15:32
Reksbril pushed a commit to Reksbril/pandas that referenced this pull request Nov 18, 2019
proost pushed a commit to proost/pandas that referenced this pull request Dec 19, 2019
proost pushed a commit to proost/pandas that referenced this pull request Dec 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clean ExtensionArray Extending pandas with custom dtypes or arrays.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants