subham singh
subham singh

Reputation: 33

how do i find the city & country with the highest number of unique customers, also the count of unique players?

[![dataset][1]][2]

how to find the country with highest number of unique customers?

Upvotes: 0

Views: 579

Answers (1)

Bushmaster
Bushmaster

Reputation: 4608

can you try:

df=df.groupby('COUNTRY')['IDCUSTOMER'].nunique()

#or if you want to group by country and city

df=df.groupby(['COUNTRY','CITY'[)['IDCUSTOMER'].nunique()

Upvotes: 1

Related Questions