Finding unique entries with oldest time stamp
I have a data frame with email addresses and date stamps, I need to find
the first email received from each address.
df DateTime Email
10/01/13 a@a.com
14/02/13 a@a.com
16/02/13 b@b.com
24/07/13 a@a.com
12/01/12 b@b.com
Would something like this work:
df.sort(column='DateTime')
new_df = unique(df[df['Email']])
Will unique will take the first value of the sorted data frame? Is there a
better way of doing this ? Thanks!
No comments:
Post a Comment