I have 2 data frames with the following format:
df1
ID age
[111, 222, 333] 15
[444] 9
[555, 666, 777, 888] 8
df2
ID school
222 A
777 B
I need to concat them by matching the IDs to get the following result
df1_ID age df2_ID school
[111, 222, 333] 15 222 A
[555, 666, 777, 888] 8 777 B
df1_ID could be a list of up to 10 IDs and I can't think of a way to concat the data frames efficiently. How would you approach this? Thanks.