Skip to content

Commit 0816a26

Browse files
committed
BUG: Fix TypeError in set operations with mixed int/string indexes
1 parent 65de448 commit 0816a26

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pandas/tests/indexes/test_setops.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,8 @@ def test_intersect_unequal(self, index_flat, fname, sname, expected_name):
464464
else:
465465
index = index_flat
466466

467+
if index.dtype == 'object':
468+
index = index.astype(str)
467469
# test copy.intersection(subset) - need sort for unicode and string
468470
first = index.copy().set_names(fname)
469471
second = index[1:].set_names(sname)

0 commit comments

Comments
 (0)