Answers for "group by 2 unique attributes pandas"

0

group by 2 unique attributes pandas

import numpy as np
g = df.groupby('c')['l1','l2'].apply(lambda x: list(np.unique(x)))
Posted by: Guest on June-22-2021

Python Answers by Framework

Browse Popular Code Answers by Language