Skip to content

Commit b87036f

Browse files
committed
BUG: Handle mixed int/str types in Index.union
1 parent 0816a26 commit b87036f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pandas/tests/indexes/test_setops.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,9 @@ def test_union_unequal(self, index_flat, fname, sname, expected_name):
395395
else:
396396
index = index_flat
397397

398+
if index.dtype == 'object':
399+
index = index.astype(str)
400+
398401
# test copy.union(subset) - need sort for unicode and string
399402
first = index.copy().set_names(fname)
400403
second = index[1:].set_names(sname)

0 commit comments

Comments
 (0)