-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ENH: add str.removeprefix #39226
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
ENH: add str.removeprefix #39226
Conversation
erfannariman
commented
Jan 17, 2021
•
edited
Loading
edited
- closes ENH: add string method remove prefix and suffix, python 3.9 #36944
- tests added / passed
- Ensure all linting tests pass, see here for how to run them
- whatsnew entry
Hello @erfannariman! 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 2021-02-12 22:46:27 UTC |
@erfannariman can you merge master and fixup |
Yes, will do this weekend. |
Will also want to add an entry to doc/source/reference/series.rst to make sure this renders in the docs |
yep, pls add to here: https://pandas.pydata.org/pandas-docs/dev/user_guide/text.html#method-summary, optionally add add an example near strip |
This pull request is stale because it has been open for thirty days with no activity. Please update or respond to this comment if you're still interested in working on this. |
@erfannariman can you merge master and get tests to pass. also can you add a benchmark. Is there a benefit to using the builtin if py39 else using the fallback and also for the fallback is there any benefit to having two maps followed by a np.where over just using the fallback function (len(prefix) is invariant so the mapper function can be defined in a closure) This does not close the issue? need to add removesuffix also? This should also work for StringArray. can you use |
Thanks @erfannariman for the PR. closing as stale. ping if you want to continue. |