If I have a DataFrame df
:
import pandas as pd
d = {'col1': ['Google','Yahoo','LinkedIn'],
'col2': ['Microsoft', 'Oracle', 'Uber']}
df = pd.DataFrame(data=d)
How can I concatenate these columns values into single cells joined with "&", like:
col1 col2
0 'Google'&'Yahoo'&'LinkedIn' 'Microsoft'&'Oracle'&'Uber'
Thanks.