Use set union on a SeriesGroupBy

289 Views Asked by At

enter image description here

Suppose that I have a dataframe(df) like above, I want to run df.groupby(['id', 'client']) and the apply union on the items column ? The result should be one row -> id = 1 and client = 70 items= {1,2,3,4,5,6,7}.

I appreciate any help with this!

0

There are 0 best solutions below