right['id'] = right.groupby('name').cumcount()
left.merge(right, on=['id', 'name'], how='outer', suffixes=['_left', '_right']
    ).drop('id', axis=1)
how to join two dataframe and align on a specific column like this?