esmepio: (vedi Python - Dataframe - gruppo - pivot table - subtotal) pivot_with_subtotals = pivot_with_subtotals.sort_values(by=["Prodotto","Città"])