GROUP BY

PHOTO EMBED

Fri Dec 10 2021 07:58:23 GMT+0000 (Coordinated Universal Time)

Saved by @MatteoK #python

# Raggruppo per X e Y e calcolo il max di Z
df.groupby(['X','Y'])['Z'].max()
content_copyCOPY

https://stackoverflow.com/questions/44383136/pandas-groupby-where-you-get-the-max-of-one-column-and-the-min-of-another-column