Python per chi usa i fogli di calcolo
Chris Cardillo
Data Scientist
fruit_sales.groupby('store', as_index=False).mean()


totals = fruit_sales.groupby(['store', 'product_name'], as_index=False).sum()

totals = (totals.sort_values('revenue', ascending=False)
.reset_index(drop=True))

top_store_sellers = totals.groupby('store').head(1).reset_index(drop=True)

# Dati grezzi
fruit_sales
# Riepilogo - per frutto e negozio
totals = fruit_sales.groupby(['store', 'product_name'], as_index=False).sum()
# Ordina il riepilogo
totals = (totals.sort_values('revenue', ascending=False)
.reset_index(drop=True))
# Prima riga per ogni negozio
top_store_sellers = totals.groupby('store').head(1).reset_index(drop=True)







Python per chi usa i fogli di calcolo