@@ -59,22 +59,22 @@ def test_getitem_listlike(self):
59
59
60
60
@pytest .mark .parametrize ("method" ,
61
61
[
62
- lambda x : x .cat .set_categories ([1 , 2 , 3 ]),
63
- lambda x : x .cat .reorder_categories ([2 , 3 , 1 ], ordered = True ),
64
- lambda x : x .cat .rename_categories ([1 ,2 ,3 ]),
65
- lambda x : x .cat .remove_unused_categories (),
66
- lambda x : x .cat .remove_categories ([2 ]),
67
- lambda x : x .cat .add_categories ([4 ]),
68
- lambda x : x .cat .as_ordered (),
69
- lambda x : x .cat .as_unordered (),
62
+ lambda x : x .cat .set_categories ([1 , 2 , 3 ]),
63
+ lambda x : x .cat .reorder_categories ([2 , 3 , 1 ]
64
+ , ordered = True ),
65
+ lambda x : x .cat .rename_categories ([1 ,2 , 3 ]),
66
+ lambda x : x .cat .remove_unused_categories (),
67
+ lambda x : x .cat .remove_categories ([2 ]),
68
+ lambda x : x .cat .add_categories ([4 ]),
69
+ lambda x : x .cat .as_ordered (),
70
+ lambda x : x .cat .as_unordered (),
70
71
])
71
72
def test_getname_categorical_accessor (self , method ):
72
73
s = pd .Series ([1 , 2 , 3 ], name = 'A' ).astype ('category' )
73
74
expected = 'A'
74
75
result = method (s ).name
75
76
assert result == expected
76
-
77
-
77
+
78
78
def test_getitem_category_type (self ):
79
79
# GH 14580
80
80
# test iloc() on Series with Categorical data
0 commit comments