I have two dataframes.
df1 :
key column_a
AA AAB
AA AAC
AB ABA
AB ABK
df2:
key column_b
AA AAA
AB ABA
AB ABK
AC ACC
I wanted to merge them but the column_a and column_b would become a list.
key column_a column_b
AA ['AAB','AAC'] ['AAA']
AB ['ABA','ABK'] ['ABA','ABK']
AC NaN ['ACC']