0

I'm doing a customer analysis where I have a big database of customers and e.g. where they come from. So I want to see how many customers come from which country. Since it's possible that one customer shows up multiple times and also with different countries I couldn't make it work with aggregate function.

Here's a data example:

data example

Thanks a lot for your help!

AnilGoyal
  • 25,297
  • 4
  • 27
  • 45
  • 1
    Do you want to keep only unique rows of the dataframe `unique(df)` ? Images are not the right way to share data/code. Add them in a reproducible format which is easier to copy. Read about [how to give a reproducible example](http://stackoverflow.com/questions/5963269). – Ronak Shah Apr 10 '21 at 10:00
  • Hi @RonakShah, correct I want to keep unique rows. But if there's multiple combinations like the first customer in this example I want to keep both combinations – user15597749 Apr 10 '21 at 10:14

0 Answers0