I want to join multiple columns of the same dataframe into a single column. The columns dosent have any labels.
input:
0 1 2 3 4
a b c d e
Result:
0
a,b,c,d,e
please help me with this.
I already tried data1['all'] = data[data.columns[1:]].apply(lambda x: ','.join(x.dropna().astype(str)),axis=1)
but I am not able to get the result as required.