File tree 1 file changed +1
-6
lines changed
1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change 53
53
Use 'allow_fill=False' to accept the new behavior.""" )
54
54
55
55
56
- @CompWrapper (inst_from_senior_cls = True , zerodim = True )
57
56
def _cat_compare_op (op ):
57
+ @CompWrapper (inst_from_senior_cls = True , zerodim = True )
58
58
def f (self , other ):
59
59
# On python2, you can usually compare any type to any type, and
60
60
# Categoricals can be seen as a custom type, but having different
61
61
# results depending whether categories are the same or not is kind of
62
62
# insane, so be a bit stricter here and use the python3 idea of
63
63
# comparing only things of equal type.
64
- if isinstance (other , (ABCDataFrame , ABCSeries , ABCIndexClass )):
65
- return NotImplemented
66
-
67
- other = lib .item_from_zerodim (other )
68
-
69
64
if not self .ordered :
70
65
if op in ['__lt__' , '__gt__' , '__le__' , '__ge__' ]:
71
66
raise TypeError ("Unordered Categoricals can only compare "
You can’t perform that action at this time.
0 commit comments