Skip to content

Commit 69dd92b

Browse files
committed
rm duplicate test from failed rebase
1 parent 4382fca commit 69dd92b

File tree

1 file changed

+0
-36
lines changed

1 file changed

+0
-36
lines changed

pandas/tests/frame/indexing/test_indexing.py

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1739,42 +1739,6 @@ def test_reindex_methods(self, method, expected_values):
17391739
actual = df[::-1].reindex(target, method=switched_method)
17401740
tm.assert_frame_equal(expected, actual)
17411741

1742-
def test_reindex_with_multi_index(self):
1743-
# https://github.com/pandas-dev/pandas/issues/29896
1744-
# tests for reindexing a multi-indexed DataFrame with a new MultiIndex
1745-
df = pd.DataFrame(
1746-
{"a": [0] * 7, "b": list(range(7)), "c": list(range(7))}
1747-
).set_index(["a", "b"])
1748-
new_index = [0.5, 2.0, 5.0, 5.8]
1749-
new_multi_index = MultiIndex.from_product([[0], new_index], names=["a", "b"])
1750-
1751-
# reindexing w/o a `method` value
1752-
reindexed = df.reindex(new_multi_index)
1753-
expected = pd.DataFrame(
1754-
{"a": [0] * 4, "b": new_index, "c": [np.nan, 2.0, 5.0, np.nan]}
1755-
).set_index(["a", "b"])
1756-
tm.assert_frame_equal(expected, reindexed)
1757-
1758-
# reindexing with backfilling
1759-
expected = pd.DataFrame(
1760-
{"a": [0] * 4, "b": new_index, "c": [1, 2, 5, 6]}
1761-
).set_index(["a", "b"])
1762-
reindexed_with_backfilling = df.reindex(new_multi_index, method="bfill")
1763-
tm.assert_frame_equal(expected, reindexed_with_backfilling)
1764-
1765-
reindexed_with_backfilling = df.reindex(new_multi_index, method="backfill")
1766-
tm.assert_frame_equal(expected, reindexed_with_backfilling)
1767-
1768-
# reindexing with padding
1769-
expected = pd.DataFrame(
1770-
{"a": [0] * 4, "b": new_index, "c": [0, 2, 5, 5]}
1771-
).set_index(["a", "b"])
1772-
reindexed_with_padding = df.reindex(new_multi_index, method="pad")
1773-
tm.assert_frame_equal(expected, reindexed_with_padding)
1774-
1775-
reindexed_with_padding = df.reindex(new_multi_index, method="ffill")
1776-
tm.assert_frame_equal(expected, reindexed_with_padding)
1777-
17781742
def test_reindex_subclass(self):
17791743
# https://github.com/pandas-dev/pandas/issues/31925
17801744
class MyDataFrame(DataFrame):

0 commit comments

Comments
 (0)