As per application requirement, I need to show all the data which is part of group by in comma separated format so the admin can take decision, I am new to Python and not sure h
In [35]: df.groupby('company').product.agg([('count', 'count'), ('product', ', '.join)])
Out[35]:
count product
company
Amazon 1 E-comm
Facebook 1 Social Media
Google 2 Search, Android
Microsoft 2 OS, X-box