python - Merging pandas dataframe indices -
how can merge 2 indices
index1 out[8]: int64index([22, 23, 24, 25, 32, 33, 34], dtype='int64') index2 out[8]: int64index([20, 23, 24, 25, 32, 33, 34], dtype='int64')
so obtain
index3 out[8]: int64index([20, 22, 23, 24, 25, 32, 33, 34], dtype='int64')
that contains index1 , index2 without duplicates?
use union
in [1331]: index1.union(index2) out[1331]: int64index([20, 22, 23, 24, 25, 32, 33, 34], dtype='int64')
wiki
Comments
Post a Comment