Best way to get last entries from Pandas data frame,df.iloc[df.groupby('id')['date'].idxmax()]