Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pandas as pd
- df1 = pd.DataFrame({ 'colA': [10, 20, 30],
- 'colB': [100, 200, 300]})
- df2 = pd.DataFrame({ 'colA': [40, 20, 50],
- 'colB': [400, 200, 500]})
- new_df = pd.concat([df1, df2]).drop_duplicates().reset_index(drop=True)
- print(new_df)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement