Advertisement
elena1234

get the unique indexes after merge in Python

May 2nd, 2023 (edited)
1,109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | Source Code | 0 0
  1. combo_df = top_ten_customers.merge(sales_last_two_years, how = 'left', on = 'SapEndCustomerId')
  2. combo_df = combo_df.set_index ('SapEndCustomerId')
  3.  
  4. combo_df = combo_df.query('~index.duplicated()')
  5. combo_df
  6.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement