@@ -1063,10 +1063,9 @@ def test_rank_categorical(self):
1063
1063
# Test ascending/descending ranking for ordered categoricals
1064
1064
exp = pd .Series ([1. , 2. , 3. , 4. , 5. , 6. ])
1065
1065
exp_desc = pd .Series ([6. , 5. , 4. , 3. , 2. , 1. ])
1066
- ser = pd .Series (
1066
+ ordered = pd .Series (
1067
1067
['first' , 'second' , 'third' , 'fourth' , 'fifth' , 'sixth' ]
1068
- )
1069
- ordered = ser .astype ('category' , ).cat .set_categories (
1068
+ ).astype ('category' , ).cat .set_categories (
1070
1069
['first' , 'second' , 'third' , 'fourth' , 'fifth' , 'sixth' ],
1071
1070
ordered = True
1072
1071
)
@@ -1084,12 +1083,6 @@ def test_rank_categorical(self):
1084
1083
res = unordered .rank ()
1085
1084
assert_series_equal (res , exp_unordered )
1086
1085
1087
- # Test na_option for rank data
1088
- na_ser = pd .Series (
1089
- ['first' , 'second' , 'third' , 'fourth' , 'fifth' , 'sixth' , np .NaN ],
1090
- ).astype ('category' ).cat .set_categories (
1091
- ['first' , 'second' , 'third' , 'fourth' , 'fifth' , 'sixth' ],
1092
-
1093
1086
# Test na_option for rank data
1094
1087
na_ser = pd .Series (
1095
1088
['first' , 'second' , 'third' , 'fourth' , 'fifth' , 'sixth' , np .NaN ]
0 commit comments