Now I have a dataframe, I want to merge rows. The value B is determined by the order in the strings in a list L = [\'xx\',\'yy\',\'zz\']
A B 0 a xx