Skip to content
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: IntervalIndex.get_loc/get_indexer wrong return value / error #25090

Closed
wants to merge 25 commits into from

Commits on Feb 2, 2019

  1. Revert earlier change and use to_numpy

    Revert pandas-dev#24048 change that caused bug.
    samuelsinayoko committed Feb 2, 2019
    Configuration menu
    Copy the full SHA
    2aca389 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2d12d2f View commit details
    Browse the repository at this point in the history
  3. Make warning go away

    samuelsinayoko committed Feb 2, 2019
    Configuration menu
    Copy the full SHA
    f357101 View commit details
    Browse the repository at this point in the history
  4. revert initial bugfix

    Write tests first
    samuelsinayoko committed Feb 2, 2019
    Configuration menu
    Copy the full SHA
    7cc4c37 View commit details
    Browse the repository at this point in the history
  5. Add test for contains in interval index categorical

    When tested with a variable that has the wrong dtype, this raises an
    exception instead of False
    samuelsinayoko committed Feb 2, 2019
    Configuration menu
    Copy the full SHA
    8ec653a View commit details
    Browse the repository at this point in the history
  6. Check get_loc on interval index raises KeyError

    When supplied a variable with the wrong type get_loc should raise a
    KeyError (not type error). Otherwise things like checking if a variable
    is in an index will fail.
    samuelsinayoko committed Feb 2, 2019
    Configuration menu
    Copy the full SHA
    878802e View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    4dabe0e View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    564d88d View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    f4c43e3 View commit details
    Browse the repository at this point in the history
  10. Make third test pass

    This is enough for making the test pass but it's not the right implementation
    samuelsinayoko committed Feb 2, 2019
    Configuration menu
    Copy the full SHA
    a09a07e View commit details
    Browse the repository at this point in the history

Commits on Feb 3, 2019

  1. Configuration menu
    Copy the full SHA
    6c887e6 View commit details
    Browse the repository at this point in the history
  2. Improve error message

    samuelsinayoko committed Feb 3, 2019
    Configuration menu
    Copy the full SHA
    0a143f2 View commit details
    Browse the repository at this point in the history
  3. Rename, move and parametrize indexer test

    Include some non-monotonic/overlapping IntervalIndex.
    This triggers another bug, due to the fact that self.get_loc(i)
    is called on an unexpected key.
    samuelsinayoko committed Feb 3, 2019
    Configuration menu
    Copy the full SHA
    0730cd6 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    246eb57 View commit details
    Browse the repository at this point in the history

Commits on Feb 4, 2019

  1. Refactor interval index get_loc test

    Move the test from indexing/test_loc to index/interval/test_interval.
    samuelsinayoko committed Feb 4, 2019
    Configuration menu
    Copy the full SHA
    93f75ea View commit details
    Browse the repository at this point in the history
  2. Fix bug introduced in earlier commit

    target was missing from call to _find_non_overlapping_monotonic_bounds
    samuelsinayoko committed Feb 4, 2019
    Configuration menu
    Copy the full SHA
    268db81 View commit details
    Browse the repository at this point in the history

Commits on Feb 6, 2019

  1. Configuration menu
    Copy the full SHA
    a5aa1e8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d480872 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6ed1080 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    120e2bc View commit details
    Browse the repository at this point in the history

Commits on Feb 10, 2019

  1. Only return -1 in get_indexer for incorrect values

    Instead of returning [-1, -1, -1] when the middle value is incorrect
    type, return [a, -1, b].
    samuelsinayoko committed Feb 10, 2019
    Configuration menu
    Copy the full SHA
    2c48272 View commit details
    Browse the repository at this point in the history
  2. Better tests for get_indexer_errors

    Add mix of invalid and valid values
    samuelsinayoko committed Feb 10, 2019
    Configuration menu
    Copy the full SHA
    02127ff View commit details
    Browse the repository at this point in the history

Commits on Feb 11, 2019

  1. Fix broken test in test_interval

    Fixes test_with_overlaps test
    samuelsinayoko committed Feb 11, 2019
    Configuration menu
    Copy the full SHA
    ad13d9e View commit details
    Browse the repository at this point in the history

Commits on Feb 16, 2019

  1. Fix broken tests in test_concat

    interval.get_indexer() should still raise a TypeError in cases
    where the types are unorderable. This is needed for DataFrame.append
    for example, which was breaking tests in test_concat.
    samuelsinayoko committed Feb 16, 2019
    Configuration menu
    Copy the full SHA
    0ff356c View commit details
    Browse the repository at this point in the history

Commits on Apr 10, 2019

  1. Configuration menu
    Copy the full SHA
    9f6b5c0 View commit details
    Browse the repository at this point in the history