pandas-dev / pandas Public
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: groupby().rolling(freq) with monotonic dates within groups #46065
Conversation
lgtm, does the iteration in _validate_datetimelike_monotonic have a big performance impact?
There will be a slight performance impact during the validation (that can be a 1 time hit) that scales with the number of groups. Here's validating 3 vs 100 groups
|
…onic dates within groups
@mroeschke - It looks like the call to |
if self._on.hasnans: | ||
raise ValueError(f"{on} must not have any NaT values.") | ||
for group_indices in self._grouper.indices.values(): | ||
group_on = self._on.take(group_indices) |
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.
yeah this is materializing things
prob not a great idea
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.
self._on is already materialized in __init__
. Is that what is meant by materialized?
@mroeschke there was no hurry on this one |
…ps (pandas-dev#46065)" This reverts commit ad0f1bf.
Sorry I was too eager on the LGTM. #46078 reverts this PR. This validation is O(number of groups). Happy to have a suggestion regarding a more performant solution. |
doc/source/whatsnew/v1.4.2.rst
file if fixing a bug or adding a new feature.The text was updated successfully, but these errors were encountered: