We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ca82d69 commit 4f9d9dfCopy full SHA for 4f9d9df
pandas/_libs/index.pyx
@@ -272,9 +272,10 @@ cdef class IndexEngine:
272
self._ensure_mapping_populated()
273
values = np.array(self._get_index_values(), copy=False)
274
targets_mask = isnaobj(targets)
275
+ values_mask = isnaobj(values)
276
if targets_mask.any():
277
targets[targets_mask] = 0
- values[isnaobj(values)] = 0
278
+ values[values_mask] = 0
279
280
stargets = set(targets)
281
n = len(values)
@@ -325,8 +326,13 @@ cdef class IndexEngine:
325
326
n_alloc += 10_000
327
result = np.resize(result, n_alloc)
328
- result[count] = j
329
- count += 1
+ if val == 0:
330
+ if targets_mask[i] == values_mask[j]:
331
+ result[count] = j
332
+ count += 1
333
+ else:
334
335
336
337
# value not found
338
else:
0 commit comments