BUG: Index.union with both bools and ints, duplicates · Issue #44000 · pandas-dev/pandas (original) (raw)

Reproducible Example

idx = pd.Index([1, True, 0, False]) idx2 = idx[1:]

idx.union(idx2) Index([0, 0, 1, 1], dtype='object')

Issue Description

Best guess is union_with_duplicates cc @phofl

Breaks at least one test in #43930

Expected Behavior

Index([1, True, 0, False], dtype=object)