-
-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
The error message for unsupported index on shift() could be more explicit #38176
Conversation
Hello @ZhihuiChen0903! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2020-12-03 14:19:42 UTC |
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.
happy to have, we have tests that check the error message and need to be adjusted (have a look at CI logs for which ones).
lgtm @ZhihuiChen0903 if you turnt his off draft can merge. |
@jreback I have turned off draft. |
thanks @ZhihuiChen0903 |
When the type of data index is not datetime-like, the following error message will raise:
NotImplementedError: Not supported for type Index
The error message could be more useful by explicitly stating which types of data that
shift
supports.Expected error message:
f"This method is only implemented for DatetimeIndex, PeriodIndex and TimedeltaIndex; Got type {type(self).__name__}."