how to find the mode using pandas groupby
source.groupby(['Country','City']).agg(lambda x:x.value_counts().index[0])
Are there any code examples left?
New code examples in category Python
source.groupby(['Country','City']).agg(lambda x:x.value_counts().index[0])