Skip to content

REF: use cached inferred_type when calling lib.infer_dtype(index) #33537

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 5 commits into from
Apr 25, 2020

Conversation

jbrockmendel
Copy link
Member

Among other things, this will let us avoid a couple of ugly calls in Series

        if isinstance(key, Index):
            key_type = key.inferred_type
        else:
            key_type = lib.infer_dtype(key, skipna=False)

Cleanup of nearby EA-handling code

@jbrockmendel jbrockmendel added Refactor Internal refactoring of code Clean labels Apr 14, 2020
values = construct_1d_object_array_from_listlike(value)

# See also: construct_1d_object_array_from_listlike
values = np.empty(len(value), dtype=object)
Copy link
Contributor

Choose a reason for hiding this comment

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

why did you change from using the function for this?

Copy link
Member Author

Choose a reason for hiding this comment

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

trying to untangle dependency structure

Copy link
Member Author

Choose a reason for hiding this comment

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

can revert, this isnt related to the rest of the PR

Copy link
Contributor

Choose a reason for hiding this comment

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

that function exists for a reason, to avoid constantly repeating the 2 lines you added. pls revert.

Copy link
Member Author

Choose a reason for hiding this comment

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

updated + green

@jreback jreback added this to the 1.1 milestone Apr 15, 2020
@jreback
Copy link
Contributor

jreback commented Apr 25, 2020

lgtm. can you merge master and ping on green.

@jbrockmendel
Copy link
Member Author

ping

@jreback jreback merged commit ee1736a into pandas-dev:master Apr 25, 2020
@jbrockmendel jbrockmendel deleted the infer_dtype-ea branch April 25, 2020 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clean Refactor Internal refactoring of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants