ENH: slicing with decreasing monotonic indexes by shoyer · Pull Request #8680 · pandas-dev/pandas (original) (raw)

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

shoyer

@shoyer shoyer changed the titleWIP: slicing with decreasing monotonic indexes ENH: slicing with decreasing monotonic indexes

Oct 31, 2014

shoyer added a commit to shoyer/pandas that referenced this pull request

Nov 2, 2014

@shoyer

Fixes pandas-dev#7640, pandas-dev#8625

This is a work in progress, but it's far enough along that I'd love to get some feedback.

TODOs (more called out in the code):

CC @jreback @cpcloud @immerrr

@shoyer

Index.is_monotonic will have a performance degradation (still O(n) time) in cases where the Index is decreasing monotonic. If necessary, we could work around this, but I think we can probably get away with this because the fall- back options are much slower and in many cases (e.g., for slice indexing) the next thing we'll want to know is if it's decreasing monotonic, anyways.

see GH7860

@shoyer

also: NaN and NaT imply not monotonic

jreback added a commit that referenced this pull request

Nov 2, 2014

@jreback

ENH: slicing with decreasing monotonic indexes

@shoyer shoyer deleted the reversed-monotonic-slices branch

November 2, 2014 22:46