@@ -1481,7 +1481,7 @@ def test_replace_period_ignore_float(self):
1481
1481
1482
1482
def test_replace_value_category_type (self , input_category_df , expected_category_df ):
1483
1483
"""
1484
- Test to ensure category dtypes are maintained
1484
+ Test to ensure category dtypes are maintained
1485
1485
after replace with direct values
1486
1486
"""
1487
1487
@@ -1493,15 +1493,16 @@ def test_replace_value_category_type(self, input_category_df, expected_category_
1493
1493
tm .assert_frame_equal (input_df , expected_category_df )
1494
1494
1495
1495
@pytest .mark .xfail (
1496
- reason = "currently, category dtype gets changed to object type after replace, see #23305" , strict = True
1496
+ reason = "currently, category dtype gets changed to object type after replace, see #23305" ,
1497
+ strict = True ,
1497
1498
)
1498
1499
def test_replace_dict_category_type (self , input_category_df , expected_category_df ):
1499
1500
"""
1500
- Test to ensure category dtypes are maintained
1501
+ Test to ensure category dtypes are maintained
1501
1502
after replace with dict values
1502
1503
"""
1503
1504
1504
1505
# replace values in input dataframe
1505
1506
input_df = input_category_df .replace ({"d" : "z" , "obj1" : "obj9" , "cat2" : "catX" })
1506
1507
1507
- tm .assert_frame_equal (input_df , expected_category_df )
1508
+ tm .assert_frame_equal (input_df , expected_category_df )
0 commit comments