-
-
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
BUG: PeriodIndex.get_loc with mismatched freq #41670
Conversation
jbrockmendel
commented
May 25, 2021
- closes #xxxx
- tests added / passed
- Ensure all linting tests pass, see here for how to run them
- whatsnew entry
is there an issue for this, does it need a release note? |
lgtm ping with a whatsnew note |
|
i dont think there is a user-facing change bc |
Index.get_loc is public? so is a user-facing change? maybe should raise |
get_loc is in that weird space where it isn't really intended for users, but it is called from outside I'll add a whatsnew note to be on the safe side
get_loc is pretty consistent about raising KeyError IIRC |
seems reasonable, my concern is that we are changing tested behavior without a deprecation and therefore it could break users code, so that break should be more obvious. maybe add a warning or deprecate this behavior instead. |
nothing in the api to suggest to the user that this method should not be used https://pandas.pydata.org/pandas-docs/dev/reference/api/pandas.Index.get_loc.html |
OK. I added a whatsnew note. |
thanks @jbrockmendel |
This seems to have caused slowdowns in several of the Period indexing benchmarks: see https://pandas.pydata.org/speed/pandas/#regressions?sort=1&dir=desc, scrolldown to "2021-05-28 17:58" |
I opened #42247 to keep track of this regression. |