I have two DataFrames:
df1:
node ids
0 ab [978]
1 bc [978, 121]
df2:
name id
0 alpha 978
1 bravo 121
I would like to add a new column called names in df1 where I get the list of names corresponding to ids column like this
node ids names
0 ab [978] [alpha]
1 bc [978, 121] [alpha,bravo]
Would apprreciate help.
ab [978]ic changed toab [10]and10is no indf2['id']