Jan-22-2022, 10:55 AM
Friends!
I have a data frame from .xslx that return 4 columns, order id, order date, order requester, order urgency,
I want to return the max() order date by order id, BUT to retrieve back the entire columns in it also e.g.:
order id | max(order date) | order requester | order urgency
tried this but I retrieve only 2 columns :
df = df.groupby(['order id'],as_index=False)[['order date']].max()
appreciate your support :-)
I have a data frame from .xslx that return 4 columns, order id, order date, order requester, order urgency,
I want to return the max() order date by order id, BUT to retrieve back the entire columns in it also e.g.:
order id | max(order date) | order requester | order urgency
tried this but I retrieve only 2 columns :
df = df.groupby(['order id'],as_index=False)[['order date']].max()
appreciate your support :-)