1data = Item[Item['Bill No'].duplicated(keep=False)]
2
3# Referenced: https://stackoverflow.com/questions/27298178/concatenate-strings-from-several-rows-using-pandas-groupby
4data['Grouped'] = data.groupby('Bill No')['Item Name'].transform(lambda x: ','.join(x))
5data2 = data[['Ending GST Bill No', 'Grouped']].drop_duplicates()
6data2.head(10)