-
-
Notifications
You must be signed in to change notification settings - Fork 18k
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
REF: implement _apply_blockwise #35359
Conversation
…f-mgr-transform-2
…f-mgr-transform-2
…f-mgr-transform-2
…f-mgr-transform-2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think ultimately you want to put this _apply_blockwise in a BlockwiseMixin, similar to SelectionMixin, so you can add it to groupby and so on, but suppose could be done later
pandas/core/window/rolling.py
Outdated
@@ -487,6 +487,36 @@ def _get_window_indexer(self, window: int) -> BaseIndexer: | |||
return VariableWindowIndexer(index_array=self._on.asi8, window_size=window) | |||
return FixedWindowIndexer(window_size=window) | |||
|
|||
def _apply_blockwise(self, homogeneous_func: Callable): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you type the output
pandas/core/window/rolling.py
Outdated
# of homogenenous DataFrames. | ||
blocks, obj = self._create_blocks(self._selected_obj) | ||
|
||
skipped = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you type these
…f-mgr-transform-2
I'm planning a BlockManager method that subsumes all of the apply-blockwise usages. For that to work, we need to get all of the relevant looping-over-blocks functions into a form that can be passed to such a method. Thats the intermediate goal of this and #35356. |
@simonjayhawkins is this new/expected?
|
Co-authored-by: Simon Hawkins <simonjayhawkins@gmail.com>
that worked, thanks @simonjayhawkins |
thanks |
Preliminary pushing towards #34714