Skip to content
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

BUG: Support custom BaseIndexers in groupby.rolling #35647

Merged

Conversation

mroeschke
Copy link
Member

@mroeschke mroeschke added Bug Groupby Window rolling, ewma, expanding labels Aug 10, 2020
@mroeschke mroeschke added this to the 1.1.1 milestone Aug 10, 2020
@@ -265,7 +265,8 @@ def __init__(
index_array: Optional[np.ndarray],
window_size: int,
groupby_indicies: Dict,
rolling_indexer: Union[Type[FixedWindowIndexer], Type[VariableWindowIndexer]],
rolling_indexer: Type[BaseIndexer],
indexer_kwargs: Optional[Dict],
Copy link
Contributor

Choose a reason for hiding this comment

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

why do you need this? (indexer_kwargs)

Copy link
Member Author

Choose a reason for hiding this comment

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

In GroupbyRollingIndex I am instantiating th user's custom indexer as I know the index_array from each group,

so I need to do:

UsersIndexer(index_array, window_size, **indexer_kwargs)

Copy link
Contributor

Choose a reason for hiding this comment

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

kk

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

jreback commented Aug 12, 2020

thanks @mroeschke

@mroeschke mroeschke deleted the bug/groupby_rolling_customindexer branch August 12, 2020 22:22
@simonjayhawkins
Copy link
Member

@meeseeksdev backport 1.1.x

meeseeksmachine pushed a commit to meeseeksmachine/pandas that referenced this pull request Aug 13, 2020
simonjayhawkins pushed a commit that referenced this pull request Aug 13, 2020
…ng (#35699)

Co-authored-by: Matthew Roeschke <emailformattr@gmail.com>
@simonjayhawkins simonjayhawkins mentioned this pull request Aug 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Groupby Window rolling, ewma, expanding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: 1.1.0 breaks custom indexer support in groupby().rolling()
3 participants