Entering edit mode
6.4 years ago
Seigfried
▴
80
Dear all
I have a dataframe containing columns with identical names for some reason. I wish to combine these columns with the same name with removing the duplicates
I tried using merge but I do not want to enter the column names one by one like merge (x, y)
horse sheep horse
A A A
B B
C
This should give
horse sheep
A A
B
C
Is there any way to do this? I googled and found ways to do it 1 by 1 but I have a lot of columns