Skip to content

Commit 16dac3a

Browse files
Update categorical.py
1 parent 7e6662d commit 16dac3a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pandas/core/arrays/categorical.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,12 @@ def f(self, other):
8989
else:
9090
other_codes = other._codes
9191

92-
na_mask = (self._codes == -1) | (other_codes == -1)
92+
mask = (self._codes == -1) | (other_codes == -1)
9393
f = getattr(self._codes, op)
9494
ret = f(other_codes)
95-
if na_mask.any():
95+
if mask.any():
9696
# In other series, the leads to False, so do that here too
97-
ret[na_mask] = False
97+
ret[mask] = False
9898
return ret
9999

100100
if is_scalar(other):
@@ -103,10 +103,10 @@ def f(self, other):
103103
ret = getattr(self._codes, op)(i)
104104

105105
# check for NaN in self
106-
na_mask = (self._codes == -1)
107-
if na_mask.any():
106+
mask = (self._codes == -1)
107+
if mask.any():
108108
# comparison to missing values NaN leads to False
109-
ret[na_mask] = False
109+
ret[mask] = False
110110
return ret
111111
else:
112112
if op == '__eq__':

0 commit comments

Comments
 (0)