how to find the country with highest number of unique customers?
CodePudding user response:
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()