I have a dataframe a thousands of rows long that looks like this:
ID Email Address
1 ... ...
2 ... ...
3 ... ...
4 ... ...
1 ... ...
2 ... ...
5 ... ...
5 ... ...
6 ... ...
what I want to do is drop duplicates of ID so there is only one ID per person. I can't use drop_duplicates() because most people don't have ID's and this drops them too (not good!)
Is there a way to remove specific rows and only keep one instance of the IDs.
I have a dataframe of all the duplicate ID I want to remove if that helps. e.g. for the example I gave above:
ID Email Address
1 ... ...
2 ... ...
5 ... ...
Maybe there's a way to turn this to a series/array of IDs and remove from the df that way?