We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 05c4c1e commit f70368bCopy full SHA for f70368b
pandas/tests/indexing/test_categorical.py
@@ -660,8 +660,6 @@ def test_reindexing_with_missing_values(self):
660
data = {"col": range(len(index))}
661
df = DataFrame(data=data, index=index)
662
663
- res = df.reset_index()
664
-
665
expected = pd.DataFrame(
666
{
667
"level_0": pd.Categorical.from_codes(
@@ -674,6 +672,11 @@ def test_reindexing_with_missing_values(self):
674
672
}
675
673
)
676
+ res = df.reset_index()
+ tm.assert_frame_equal(res, expected)
677
+
678
+ # roundtrip
679
+ res = expected.set_index(["level_0", "level_1"]).reset_index()
680
tm.assert_frame_equal(res, expected)
681
682
def test_loc_and_at_with_categorical_index(self):
0 commit comments