Skip to content

BUG: label-based slices don't support negative step #8716

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

Closed
immerrr opened this issue Nov 2, 2014 · 0 comments · Fixed by #8753
Closed

BUG: label-based slices don't support negative step #8716

immerrr opened this issue Nov 2, 2014 · 0 comments · Fixed by #8753
Labels
Bug Indexing Related to indexing on series/frames, not to indexes themselves
Milestone

Comments

@immerrr
Copy link
Contributor

immerrr commented Nov 2, 2014

Something feels wrong about this:

In [35]: s = pd.Series(np.arange(6), index=list('abcdef'))

In [36]: s
Out[36]: 
a    0
b    1
c    2
d    3
e    4
f    5
dtype: int64

In [37]: s.loc['e'::-1]
Out[37]: Series([], dtype: int64)

In [38]: s.iloc[4::-1]
Out[38]: 
e    4
d    3
c    2
b    1
a    0
dtype: int64

In [39]: s['e'::-1]
Out[39]: Series([], dtype: int64)
@jreback jreback added Bug Indexing Related to indexing on series/frames, not to indexes themselves labels Nov 2, 2014
@jreback jreback added this to the 0.15.2 milestone Nov 2, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Indexing Related to indexing on series/frames, not to indexes themselves
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants