I have a dataframe called 'df1':
Name Type Destination Data1 Data2
Bob Car NY asdf dsfg
Liz Car NY asdf dsfg
And another called 'df2':
Name Type Destination Data1 Data2
Bob Train LA asdf dsfg
Liz Car NY asdf dsfg
I want to combine them together based on 3 values to form a 'key': Name, Type, Destination to end up with:
Name Type Destination
Bob Car NY
Bob Train LA
Liz Car NY
Where there are no repeats and the row with Bob, Train, LA... is added since it is a unique entry.
So far I have:
new_df = pd.concat([df1.Name, df2.Name]).drop_duplicates().sort_values(ascending=True).reset_index(drop=True)
but that only works when trying to combine a unique list based off a singular key.