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