8000 BUG: TimedeltaIndex raising ValueError when slice indexing (#16637) by jdeschenes · Pull Request #16638 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

BUG: TimedeltaIndex raising ValueError when slice indexing (#16637) #16638

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

Merged
merged 13 commits into from
Jul 6, 2017
Prev Previous commit
Next Next commit
Fixed lint issue
  • Loading branch information
Jean-Mathieu Deschenes committed Jul 4, 2017
commit 7df27da8e6dd4aaffc1bf985d191ffae1365ece3
9 changes: 5 additions & 4 deletions pandas/tests/indexing/test_timedelta.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ def test_boolean_indexing(self):
dtype='int64')
tm.assert_frame_equal(expected, result)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just make sure test is near other slicing testsing (may not actually be many).

@pytest.mark.parametrize("indexer, expected",
[(0, [20, 1, 2, 3, 4, 5, 6, 7, 8, 9]),
(slice(4, 8), [0, 1, 2, 3, 20, 20, 20, 20, 8, 9],),
([3, 5], [0, 1, 2, 20, 4, 20, 6, 7, 8, 9])])
@pytest.mark.parametrize(
"indexer, expected",
[(0, [20, 1, 2, 3, 4, 5, 6, 7, 8, 9]),
(slice(4, 8), [0, 1, 2, 3, 20, 20, 20, 20, 8, 9]),
([3, 5], [0, 1, 2, 20, 4, 20, 6, 7, 8, 9])])
def test_list_like_indexing(self, indexer, expected):
# GH 16637
df = pd.DataFrame({'x': range(10)}, dtype="int64")
Expand Down
0