Skip to content

REF: extract_array earlier in block construction #40026

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

Conversation

jbrockmendel
Copy link
Member

The idea is to eventually get the extract_array out of maybe_coerce_values which will improve Block.__init__ perf.

The main remaining blocker to that is downstream usage. @jorisvandenbossche i know pyarrow accesses some of core.internals, do you know if it is just make_block or is anything else accessed?

@jorisvandenbossche
Copy link
Member

The main remaining blocker to that is downstream usage. @jorisvandenbossche i know pyarrow accesses some of core.internals, do you know if it is just make_block or is anything else accessed?

I think it is mainly make_block and the BlockManager(..) constructor.

@jreback jreback added the Internals Related to non-user accessible pandas implementation label Feb 25, 2021
@jreback jreback added this to the 1.3 milestone Feb 25, 2021
@@ -1638,16 +1640,20 @@ def create_block_manager_from_blocks(blocks, axes: List[Index]) -> BlockManager:
raise construction_error(tot_items, blocks[0].shape[1:], axes, e)


# We define this here so we can override it in tests.extension.test_numpy
Copy link
Contributor

Choose a reason for hiding this comment

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

pretty janky but i get it

Copy link
Member

Choose a reason for hiding this comment

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

See #40021

@jreback jreback merged commit b1363b4 into pandas-dev:master Feb 25, 2021
@jbrockmendel jbrockmendel deleted the typ-maybe_cast_to_datetime-2 branch February 25, 2021 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Internals Related to non-user accessible pandas implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants