Skip to content

Commit 5ab4f98

Browse files
Small fixes
1 parent a625bd4 commit 5ab4f98

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pandas/_libs/index.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,14 +309,14 @@ cdef class IndexEngine:
309309
try:
310310
start = values.searchsorted(starget, side='left')
311311
end = values.searchsorted(starget, side='right')
312-
except TypeError: # e.g. if we tried to search for string in int array
312+
except TypeError: # e.g. if we tried to search for string in int array
313313
remaining_stargets.add(starget)
314314
else:
315315
if start != end:
316316
d[starget] = list(range(start, end))
317317

318318
stargets = remaining_stargets
319-
319+
320320
if stargets:
321321
# otherwise, map by iterating through all items in the index
322322
for i in range(n):

pandas/tests/test_base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -992,8 +992,8 @@ def test_bool_indexing(self, indexer_klass, indexer):
992992

993993
def test_get_indexer_non_unique_dtype_mismatch(self):
994994
indexes, missing = pd.Index(['A', 'B']).get_indexer_non_unique(pd.Index([0]))
995-
tm.assert_numpy_array_equal(np.array([], dtype=np.intp), indexes)
996-
tm.assert_numpy_array_equal(np.array([0, 1], dtype=np.intp), missing)
995+
tm.assert_numpy_array_equal(np.array([-1], dtype=np.intp), indexes)
996+
tm.assert_numpy_array_equal(np.array([0], dtype=np.intp), missing)
997997

998998

999999
class TestTranspose(Ops):

0 commit comments

Comments
 (0)