Hello Everyone,
I have a sample dataset as shown below. Each ID has different dates. I want to get an output which satisfies two conditions.
1. Keeping only the IDs which have atleast two dates.
2. Deleting the dulpicate dates for each ID.
Date | ID |
10/22/2014 | 1 |
10/22/2014 | 1 |
4/23/2014 | 1 |
5/25/2014 | 1 |
4/25/2014 | 2 |
10/22/2014 | 3 |
4/23/2014 | 3 |
4/25/2014 | 4 |
3/4/2014 | 4 |
5/5/2014 | 4 |
5/23/2014 | 5 |
5/25/2014 | 6 |
5/25/2014 | 6 |
5/25/2014 | 6 |
6/24/2014 | 6 |
6/25/2014 | 6 |
6/24/2014 | 6 |
5/8/2014 | 7 |
6/28/2014 | 8 |
6/28/2014 | 8 |
5/24/2014 | 9 |
5/24/2014 | 9 |
8/26/2014 | 9 |
8/26/2014 | 9 |
So, when the above conditions are met, My output should look like below.
Date | ID |
10/22/2014 | 1 |
4/23/2014 | 1 |
5/25/2014 | 1 |
10/22/2014 | 3 |
4/23/2014 | 3 |
4/25/2014 | 4 |
3/4/2014 | 4 |
5/5/2014 | 4 |
5/25/2014 | 6 |
6/24/2014 | 6 |
6/25/2014 | 6 |
5/24/2014 | 9 |
8/26/2014 | 9 |
Please guide me in coding this.
Thank you