I have the following dataframe:
obj_id data_date value 0 4 2011-11-01 59500 1 2 2011-10-01 35200 2 4 2010-07-31 24860
Updating thetainted1's answer since some of the functions have future warnings now as tommy.carstensen pointed out. Here's what worked for me:
sorted = df.sort_values(by='data_date') result = sorted.drop_duplicates('obj_id', keep='last')