grouping products for sales

Solutions on MaxInterview for grouping products for sales by the best coders in the world

showing results for - "grouping products for sales"
Philippine
23 Mar 2016
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)