text_html_output_1.png
import pandas as pd

df = pd.read_csv('../input/brooklyn-food-waste/brooklyn.csv')

df = df[df['label_date'].notna()]

df = df[(df['diff'] > df['diff'].quantile(0.05)) & (df['diff'] < df['diff'].quantile(0.95))]

df_labels = df.groupby('label_language').agg({'id': 'count', 'diff': 'mean'})
df_labels.columns = ['count', 'diff']

df.groupby('retailer_type').count().id.to_frame().sort_values(by='id', ascending=False)

df_food = df.groupby('food_detail').agg({'id': 'count', 'diff': 'mean'}).sort_values(by='id', ascending=False).head(10).reset_index()

df_r = df.groupby(['retailer_type', 'food_detail'])['diff'].mean().to_frame().reset_index()

df.groupby('organic')['diff'].sum()