Here is the original data set

```
id         firstname    lastname      email               update date
A1         wendy         smith         ws@mail.com        2018-01-02
A1         wendy         smith         smith@mail.com     2019-02-03 
A2         harry         lynn          lynn@mail.com      2016-04-03
A2         harry                       harylynn@mail.com  2019-03-12
A3         tinna         dickey        tinna@mail.com      2016-04-03
A3         tinna         dickey        776-3384-333       2019-03-12

```

my design is to group rows with same id, if some columns with same id contain different values, keep the latest one.
So the result should be like this:

```
id         firstname    lastname      email               update date
A1         wendy         smith         smith@mail.com     2019-02-03 
A2         harry         lynn          harylynn@mail.com  2019-03-12
A3         tinna         dickey        tinna@mail.com      2019-03-12

```

currently, I try to use pandas groupby to group cell with the same value and keep different values in one cell separated by "," for later use(remove earlier data, make one cell one data ). BUt, I think what I am doing is not right... 

```
df=df.groupby(['id']).agg({'first_name': lambda x:','.join(set(x))})

```

What if the latest value is a wrong value, do I need to store the conflict value to a new column for latter clean?

Any help will be appreciated!