Elektronik Tablo Kullanıcıları için Python
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)

# Ham veriler
fruit_sales
# Özet - meyve ve mağaza bazında
totals = fruit_sales.groupby(['store', 'product_name'], as_index=False).sum()
# Özeti sırala
totals = (totals.sort_values('revenue', ascending=False)
.reset_index(drop=True))
# Her mağaza için ilk satır
top_store_sellers = totals.groupby('store').head(1).reset_index(drop=True)







Elektronik Tablo Kullanıcıları için Python