Repository navigation
Add removeprefix and removesuffix as StringMethods - #8912
Conversation
|
Can one of the admins verify this patch? |
- Only support `removeprefix`/removesuffix` for pandas versions that support it - Use builtin `derived_from` support to error nicely if the pandas version doesn't support it. - Simplify tests - Don't copy docstrings, ensure docs are built with pandas >= 1.14.0 to include this new method.
|
Thanks @jorloplaz, I've pushed up a patch that simplifies the implementation. In general, we don't support methods that the user's installed version of pandas doesn't support (so no need to patch around if < 1.14). We can also rely on |
|
Thanks to you @jcrist , I wasn't sure that Just a comment: Pandas minimal version is |
Good catch! I updated the test so that it would have caught that. And I update the version in the accessor as well :) |
|
ok to test |
|
Thanks @jorloplaz!! |
pre-commit run --all-files