reindex to get rid of duplicate index pandas code example Example: drop duplicate index pandas df3 = df3[~df3.index.duplicated(keep='first')]