Skip to content

Conversation

jbrockmendel
Copy link
Member

Follows #35535

This isn't yet identical to apply_blockwise, because both this and apply_blockwise have some odd behaviors that need to get standardized before they get combined into a BlockManager method, but this is a move in that direction.

@jreback jreback added the Internals Related to non-user accessible pandas implementation label Aug 10, 2020
@jreback jreback added this to the 1.2 milestone Aug 10, 2020
# is a lie. To keep the code-path for the typical non-split case
# clean, we choose to clean up this mess later on.
assert len(locs) == result.shape[1]
new_blocks = []
Copy link
Contributor

Choose a reason for hiding this comment

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

can you type this

Copy link
Contributor

Choose a reason for hiding this comment

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

can you type this

Copy link
Contributor

Choose a reason for hiding this comment

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

and move this to a higher scope (as used in both parts)

Copy link
Member Author

Choose a reason for hiding this comment

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

We only append to it in this scope, everywhere else we set it directly

Copy link
Contributor

Choose a reason for hiding this comment

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

this is used in 3 blackes (sure you don't append and instead directly assign in the other scopes), but it is the same name. I would simply define it once, then append for each (or leave the assign for the others is ok i guess); it just is much easier to grok the fact that we are defining the same variable.

Copy link
Member Author

Choose a reason for hiding this comment

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

done+green


for block in data.blocks:
# Avoid inheriting result from earlier in the loop
def blk_func(block):
Copy link
Contributor

Choose a reason for hiding this comment

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

can you type this

new_blocks = [agg_block]
return new_blocks

skipped = []
Copy link
Contributor

Choose a reason for hiding this comment

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

can you type 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.

done

# is a lie. To keep the code-path for the typical non-split case
# clean, we choose to clean up this mess later on.
assert len(locs) == result.shape[1]
new_blocks = []
Copy link
Contributor

Choose a reason for hiding this comment

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

can you type this

# is a lie. To keep the code-path for the typical non-split case
# clean, we choose to clean up this mess later on.
assert len(locs) == result.shape[1]
new_blocks = []
Copy link
Contributor

Choose a reason for hiding this comment

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

and move this to a higher scope (as used in both parts)

@jreback jreback merged commit 8145ea6 into pandas-dev:master Aug 12, 2020
@jreback
Copy link
Contributor

jreback commented Aug 12, 2020

thanks

@jbrockmendel jbrockmendel deleted the ref-mgr-transform-3 branch August 12, 2020 22: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.

2 participants