Starting from this dataframe df:
df = pd.DataFrame({\'c\':[1,1,1,2,2,2],\'l1\':[\'a\',\'a\',\'b\',\'c\',\'c\',\'b\'],\'l2\':[\'b\',\'d\',\'d\',\'f\',\'e\',\'f\']
Alternatively, you can use agg:
agg
g = df.groupby('c')['l1','l2'].agg(['unique'])