Pandas : Concat rows of a dataframe with same index to form custom string in pairs
Say I have a dataframe df = pd.DataFrame({‘colA’ : [‘ABC’, ‘JKL’, ‘STU’, ‘123’], ‘colB’ : [‘DEF’, ‘MNO’, ‘VWX’, ‘456’], ‘colC’ : [‘GHI’, ‘PQR’, ‘YZ’, ‘789’],}, index = [0,0,1,1]) colA colB colC 0 ABC DEF GHI 0 JKL MNO PQR 1 STU VWX YZ 1 123 456 789 Its guranteed that every pair will have the… Read More Pandas : Concat rows of a dataframe with same index to form custom string in pairs