group by 2 unique attributes pandas

Solutions on MaxInterview for group by 2 unique attributes pandas by the best coders in the world

showing results for - "group by 2 unique attributes pandas"
Jasmine
19 Nov 2018
1import numpy as np
2g = df.groupby('c')['l1','l2'].apply(lambda x: list(np.unique(x)))
3