-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG (string): Series.str.slice with negative step #59724
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 (string): Series.str.slice with negative step #59724
Conversation
fbd021d
to
f0a56de
Compare
pandas/core/arrays/arrow/array.py
Outdated
if start is None: | ||
start = 0 |
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.
See my comment in #59710, but so probably this should be start = -1
if step < 0
, and then the above fallback might not be needed
f0a56de
to
3b24db7
Compare
744aec6
to
c20e800
Compare
If something fails for older version of pyarrow, can we instead fallback to the python implementation for that version of pyarrow? (instead of failing for the user, i.e. skipping that in the tests) |
And while we are touching those methods, move it to the mixin at once as well? |
b28f352
to
c20e800
Compare
just tried that and it broke the min versions test, looks like it is getting an int64 dtype somehow. just restored the xfail. |
Sorry, I don't understand how that can let those tests fail to use our long-used object dtype implementation. What was the error you got? |
will re-restore the fallback to find out.
ive been rebasing (instead of merging main like usual) on the theory it would make backporting easier. if that theory is mistaken, ill go back to the usual system. |
Also when you add new commits for any change you make, you can still use rebase instead of merge to update with the latest main, if you prefer that
PRs are always squashed into a single commit on top of main when merging, so I don't think this has any impact on backporting ease |
Co-authored-by: Joris Van den Bossche <[email protected]>
Just pushed one small additional case that wasn't covered yet (one that was failing before with StringDtype as well) |
Thanks! |
Co-authored-by: Joris Van den Bossche <[email protected]>
Co-authored-by: Joris Van den Bossche <[email protected]>
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.