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