-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
CLN: no longer need to catch AttributeError, IndexError #29591
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
Conversation
except (ValueError, KeyError, AttributeError, IndexError): | ||
# TODO: IndexError can be removed here following GH#29106 | ||
# TODO: AttributeError is caused by _index_data hijinx in | ||
# libreduction, can be removed after GH#29160 |
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.
Why can this AttributeError now be removed? (the mentioned PR wasn't merged)
It's solved in a different way?
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.
This was fixed as a side-effect in #29548. It turned out SeriesGrouper
was incorrectly failing to update _index_data
, only SeriesBinGrouper
was doing it correctly.
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.
Ah, so it was the _data
-> _index_data
change there. I see!
thanks |
cc @jreback @WillAyd
As of today, we don't call
agg_series
unlessngroups > 0
, which has the side-benefit that we don't call unlesslen(self.bins) > 0
, which means we no longer risk hitting anIndexError
in libreduction L262.No longer needing to catch AttributeError is [mumble mumble...] I'll figure out what past-me was thinking after a good night's sleep.