Create a concatenation of values in pandas based on values of another column
I have 2 dataframes
df1
NAME CODE andy a,d roger b danny