I need to select all columns from a dataframe by grouping on 'ID'. But when I do that I only get the ID and 'value'. I need all columns
a=df.groupby(df['id']).agg({"date": "max"}
a.show()
This only selects 'id' and 'date' columns. There are other columns. How do I select all columns for the max value in date.