I have the following 2 data frames:
df1 = pd.DataFrame({
'identifier': ['1','2','3'],
'wait times k': [12,13,14]
})
df2 = pd.DataFrame({
'identifier': ['2','4','3','6'],
'bc': [10,33,50,30]
})
I want to add a new column to df2 where it contains 'wait times k' in df1 matched based on the identifiers.
Desired Output:
identifier bc wait times k
0 2 10 13
1 4 33 Nan
2 3 50 14
3 6 30 Nan