text_plain_output_1.png
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

df = pd.read_csv('/kaggle/input/starbucks-nutrition/starbucks.csv', index_col=0)

df.describe

df.isnull().sum()

highest_calorie_item = df.loc[df['calories'].idxmax(), 'item']
highest_calorie_value = df['calories'].max()
lowest_calorie_item = df.loc[df['calories'].idxmin(), 'item']
lowest_calorie_value = df['calories'].min()

highest_fat_item = df.loc[df['fat'].idxmax(), 'item']
highest_fat_value = df['fat'].max()
highest_carb_item = df.loc[df['carb'].idxmax(), 'item']
highest_carb_value = df['carb'].max()
highest_fiber_item = df.loc[df['fiber'].idxmax(), 'item']
highest_fiber_value = df['fiber'].max()
highest_protein_item = df.loc[df['protein'].idxmax(), 'item']
highest_protein_value = df['protein'].max()

filtered_items = df[(df['fiber'] > 0) & (df['fat'] < 5) & (df['carb'] < 30)]
if filtered_items.empty:
    print('No food items are particularly rich in fiber but low in fat and carbohydrates.')
else:
    print('Food items that are particularly rich in fiber but low in fat and carbohydrates:')
    for item in filtered_items['item']:
        print(f'- {item}')