Mcdonald Assignment - Bindu Sagar A-19!09!2021

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 22

9/19/21, 12:15 AM Mcdonald Assignment_ Bindu Sagar A-19-09-2021

McDonalds Assignment

Report Summary

Questions:-
Plot graphically which food categories have the highest and lowest varieties.
Which all variables have an outlier?
Which variables have the highest correlation? Plot them and find out the value?
Which category contributes to the maximum % of Cholesterol in a diet (% daily value)?
Which item contributes maximum to the Sodium intake?
Which 4 food items contain the most amount of Saturated Fat?

Preliminary Analysis of the Dataset


In [1]:
import numpy as np

import pandas as pd

import matplotlib.pyplot as plt

%matplotlib inline

import seaborn as sns

sns.set(color_codes=True)

In [2]:
df=pd.read_csv('C:/Users/91837/OneDrive/Desktop/DATA/competition/Mcdonald .csv')

In [3]:
df.head()

Out[3]:
Total Saturated
Calories
Serving Total Fat (% Saturated Fat (% Trans
Category Item Calories from ... C
Size Fat Daily Fat Daily Fat
Fat
Value) Value)

Egg 4.8 oz
0 Breakfast 300 120 13.0 20 5.0 25 0.0 ...
McMuffin (136 g)

Egg
4.8 oz
1 Breakfast White 250 70 8.0 12 3.0 15 0.0 ...
(135 g)
Delight

Sausage 3.9 oz
2 Breakfast 370 200 23.0 35 8.0 42 0.0 ...
McMuffin (111 g)

Sausage
5.7 oz
3 Breakfast McMuffin 450 250 28.0 43 10.0 52 0.0 ...
(161 g)
with Egg

file:///C:/Users/91837/Downloads/Mcdonald Assignment_ Bindu Sagar A-19-09-2021.html 1/22


9/19/21, 12:15 AM Mcdonald Assignment_ Bindu Sagar A-19-09-2021

Total Saturated
Calories
Serving Total Fat (% Saturated Fat (% Trans
Category Item Calories from ... C
Size Fat Daily Fat Daily Fat
Fat
Value) Value)

Sausage
McMuffin 5.7 oz
4 Breakfast 400 210 23.0 35 8.0 42 0.0 ...
with Egg (161 g)
Whites

5 rows × 24 columns

Preliminary Analysis of the Dataset


In [4]:
df.describe().T

Out[4]: count mean std min 25% 50% 75% max

Calories 260.0 368.269231 240.269886 0.0 210.000 340.0 500.00 1880.0

Calories from Fat 260.0 127.096154 127.875914 0.0 20.000 100.0 200.00 1060.0

Total Fat 260.0 14.165385 14.205998 0.0 2.375 11.0 22.25 118.0

Total Fat (% Daily Value) 260.0 21.815385 21.885199 0.0 3.750 17.0 35.00 182.0

Saturated Fat 260.0 6.007692 5.321873 0.0 1.000 5.0 10.00 20.0

Saturated Fat (% Daily Value) 260.0 29.965385 26.639209 0.0 4.750 24.0 48.00 102.0

Trans Fat 260.0 0.203846 0.429133 0.0 0.000 0.0 0.00 2.5

Cholesterol 260.0 54.942308 87.269257 0.0 5.000 35.0 65.00 575.0

Cholesterol (% Daily Value) 260.0 18.392308 29.091653 0.0 2.000 11.0 21.25 192.0

Sodium 260.0 495.750000 577.026323 0.0 107.500 190.0 865.00 3600.0

Sodium (% Daily Value) 260.0 20.676923 24.034954 0.0 4.750 8.0 36.25 150.0

Carbohydrates 260.0 47.346154 28.252232 0.0 30.000 44.0 60.00 141.0

Carbohydrates (% Daily
260.0 15.780769 9.419544 0.0 10.000 15.0 20.00 47.0
Value)

Dietary Fiber 260.0 1.630769 1.567717 0.0 0.000 1.0 3.00 7.0

Dietary Fiber (% Daily Value) 260.0 6.530769 6.307057 0.0 0.000 5.0 10.00 28.0

Sugars 260.0 29.423077 28.679797 0.0 5.750 17.5 48.00 128.0

Protein 260.0 13.338462 11.426146 0.0 4.000 12.0 19.00 87.0

Vitamin A (% Daily Value) 260.0 13.426923 24.366381 0.0 2.000 8.0 15.00 170.0

Vitamin C (% Daily Value) 260.0 8.534615 26.345542 0.0 0.000 0.0 4.00 240.0

Calcium (% Daily Value) 260.0 20.973077 17.019953 0.0 6.000 20.0 30.00 70.0

Iron (% Daily Value) 260.0 7.734615 8.723263 0.0 0.000 4.0 15.00 40.0

file:///C:/Users/91837/Downloads/Mcdonald Assignment_ Bindu Sagar A-19-09-2021.html 2/22


9/19/21, 12:15 AM Mcdonald Assignment_ Bindu Sagar A-19-09-2021

Inference :-

Describe tells us the distribution of the numerical data of the


McDonals Dataset. Deviation

Here, Mean and Standard especially help us to understand the


variation of the numerical data in the dataset

columns which are present on the Left side.

In [5]:
df.info()

<class 'pandas.core.frame.DataFrame'>

RangeIndex: 260 entries, 0 to 259

Data columns (total 24 columns):

# Column Non-Null Count Dtype

--- ------ -------------- -----

0 Category 260 non-null object

1 Item 260 non-null object

2 Serving Size 260 non-null object

3 Calories 260 non-null int64

4 Calories from Fat 260 non-null int64

5 Total Fat 260 non-null float64

6 Total Fat (% Daily Value) 260 non-null int64

7 Saturated Fat 260 non-null float64

8 Saturated Fat (% Daily Value) 260 non-null int64

9 Trans Fat 260 non-null float64

10 Cholesterol 260 non-null int64

11 Cholesterol (% Daily Value) 260 non-null int64

12 Sodium 260 non-null int64

13 Sodium (% Daily Value) 260 non-null int64

14 Carbohydrates 260 non-null int64

15 Carbohydrates (% Daily Value) 260 non-null int64

16 Dietary Fiber 260 non-null int64

17 Dietary Fiber (% Daily Value) 260 non-null int64

18 Sugars 260 non-null int64

19 Protein 260 non-null int64

20 Vitamin A (% Daily Value) 260 non-null int64

21 Vitamin C (% Daily Value) 260 non-null int64

22 Calcium (% Daily Value) 260 non-null int64

23 Iron (% Daily Value) 260 non-null int64

dtypes: float64(3), int64(18), object(3)

memory usage: 48.9+ KB

Inference :-

file:///C:/Users/91837/Downloads/Mcdonald Assignment_ Bindu Sagar A-19-09-2021.html 3/22


9/19/21, 12:15 AM Mcdonald Assignment_ Bindu Sagar A-19-09-2021

Info tells us about the type of value within each column.

Here, in our Data set we have Integer, Float and Object types.

Also, we can observe that there are " Missing Values " .

As every column has the the same 260 values.

In [6]:
df.shape

Out[6]: (260, 24)

Inference :-

Shape tells us about the Rows & Columns in the Dataset.

As we can see there are 260 Rows and 24 Columns.

In [7]:
df.isnull().sum()

Out[7]: Category 0
Item 0
Serving Size 0
Calories 0
Calories from Fat 0
Total Fat 0
Total Fat (% Daily Value) 0
Saturated Fat 0
Saturated Fat (% Daily Value) 0
Trans Fat 0
Cholesterol 0
Cholesterol (% Daily Value) 0
Sodium 0
Sodium (% Daily Value) 0
Carbohydrates 0
Carbohydrates (% Daily Value) 0
Dietary Fiber 0
Dietary Fiber (% Daily Value) 0
Sugars 0
Protein 0
Vitamin A (% Daily Value) 0
Vitamin C (% Daily Value) 0
Calcium (% Daily Value) 0
Iron (% Daily Value) 0
dtype: int64

file:///C:/Users/91837/Downloads/Mcdonald Assignment_ Bindu Sagar A-19-09-2021.html 4/22


9/19/21, 12:15 AM Mcdonald Assignment_ Bindu Sagar A-19-09-2021

Inference :-

isnull tells us about the Null values in the Dataset.

As we can see the Columns have " 0 " has outcome.

Which represents No Null Values.

Getting to know the McDonalds Dataset


better

In [8]:
df['Category'].value_counts()

Out[8]: Coffee & Tea 95

Breakfast 42

Smoothies & Shakes 28

Beverages 27

Chicken & Fish 27

Beef & Pork 15

Snacks & Sides 13

Desserts 7

Salads 6

Name: Category, dtype: int64

In [9]:
df['Category'].nunique()

Out[9]: 9

Inference :-

First column is Category .

We have 9 different types of Food offered at McDonalds.


file:///C:/Users/91837/Downloads/Mcdonald Assignment_ Bindu Sagar A-19-09-2021.html 5/22
9/19/21, 12:15 AM Mcdonald Assignment_ Bindu Sagar A-19-09-2021

The complete list which has Coffee, Tea, Breakfast items is


available above.

In [10]:
df['Item'].value_counts().head(15)

Out[10]: Chipotle BBQ Snack Wrap (Grilled Chicken) 1

Premium Southwest Salad (without Chicken) 1

Sweet Tea (Large) 1

Iced Coffee with Sugar Free French Vanilla Syrup (Large) 1

Fat Free Chocolate Milk Jug 1

Chocolate Shake (Large) 1

Hazelnut Iced Coffee (Large) 1

Big Breakfast with Hotcakes (Large Biscuit) 1

Mocha with Nonfat Milk (Large) 1

Iced Caramel Mocha (Medium) 1

Egg McMuffin 1

Fruit & Maple Oatmeal 1

Iced Nonfat Caramel Mocha (Medium) 1

Diet Coke (Medium) 1

McChicken 1

Name: Item, dtype: int64

In [11]:
df['Item'].nunique()

Out[11]: 260

Inference :-

2nd column is Item .

We have 260 different types of Food items available at


McDonalds.

The rest of the columns has Nutrional details of each of the Food
items.

Note :-
file:///C:/Users/91837/Downloads/Mcdonald Assignment_ Bindu Sagar A-19-09-2021.html 6/22
9/19/21, 12:15 AM Mcdonald Assignment_ Bindu Sagar A-19-09-2021

We now have a fair idea, as to what is present in our McDonald


dataset.

Having established this, let us now proceed to the Questions and


their Answers.

Q1. Plot graphically which food categories


have the highest and lowest varieties.

In [12]:
plt.figure(figsize=(15,7))

df["Category"].hist();

Inference :-

The highest sales is of :-


Coffee and Tea

file:///C:/Users/91837/Downloads/Mcdonald Assignment_ Bindu Sagar A-19-09-2021.html 7/22


9/19/21, 12:15 AM Mcdonald Assignment_ Bindu Sagar A-19-09-2021

The lowest sales is of :-


Salads

Desserts

Q2. Which all variables have an outlier ?

In [13]:
df.columns

Out[13]: Index(['Category', 'Item', 'Serving Size', 'Calories', 'Calories from Fat',

'Total Fat', 'Total Fat (% Daily Value)', 'Saturated Fat',

'Saturated Fat (% Daily Value)', 'Trans Fat', 'Cholesterol',

'Cholesterol (% Daily Value)', 'Sodium', 'Sodium (% Daily Value)',

'Carbohydrates', 'Carbohydrates (% Daily Value)', 'Dietary Fiber',

'Dietary Fiber (% Daily Value)', 'Sugars', 'Protein',

'Vitamin A (% Daily Value)', 'Vitamin C (% Daily Value)',

'Calcium (% Daily Value)', 'Iron (% Daily Value)'],

dtype='object')

In [14]:
df.boxplot(figsize=(20,10), grid=False)

plt.xticks(rotation = 90);

In [15]:
plt.figure(figsize=(15,10))

sns.boxplot(data=df[['Calories','Calories from Fat','Saturated Fat']]);

file:///C:/Users/91837/Downloads/Mcdonald Assignment_ Bindu Sagar A-19-09-2021.html 8/22


9/19/21, 12:15 AM Mcdonald Assignment_ Bindu Sagar A-19-09-2021

Inference :-

The columns which have outlier :-


Calories

Calories from Fat

The columns which don't have outlier :-


Saturated Fat

In [16]:
plt.figure(figsize=(3,5))

sns.boxplot(data=df[['Trans Fat']]);

file:///C:/Users/91837/Downloads/Mcdonald Assignment_ Bindu Sagar A-19-09-2021.html 9/22


9/19/21, 12:15 AM Mcdonald Assignment_ Bindu Sagar A-19-09-2021

In [17]:
plt.figure(figsize=(15,10))

sns.boxplot(data=df[['Total Fat','Total Fat (% Daily Value)','Sodium (% Daily Value)

Inference :-

The columns which have an outlier :-


Total Fat

file:///C:/Users/91837/Downloads/Mcdonald Assignment_ Bindu Sagar A-19-09-2021.html 10/22


9/19/21, 12:15 AM Mcdonald Assignment_ Bindu Sagar A-19-09-2021

Total Fat (% Daily Value)

Sodium (% Daily Value)

In [18]:
plt.figure(figsize=(15,10))

sns.boxplot(data=df[['Carbohydrates','Carbohydrates (% Daily Value)','Dietary Fiber'

Inference :-

The columns which have an outlier :-


Carbohydrates

Carbohydrates (% Daily Value)

Dietary Fiber (% Daily Value)

The columns which don't have an outlier :-


Dietary Fiber

file:///C:/Users/91837/Downloads/Mcdonald Assignment_ Bindu Sagar A-19-09-2021.html 11/22


9/19/21, 12:15 AM Mcdonald Assignment_ Bindu Sagar A-19-09-2021

Here, Dietary Fiber does not have an outlier but the same
column's Dietary Fiber (% Daily Value) has an outlier. It denotes
that Dietary Fiber in certain, has food items, which are
significantly different in Fiber concentration than the other food
items.

In [19]:
plt.figure(figsize=(3,5))

sns.boxplot(y = df['Sodium']);

Inference :-

The columns which have an outlier :-


Sodium

In [20]:
plt.figure(figsize=(7,5))

sns.boxplot(data=df[['Sugars', 'Protein']]);

file:///C:/Users/91837/Downloads/Mcdonald Assignment_ Bindu Sagar A-19-09-2021.html 12/22


9/19/21, 12:15 AM Mcdonald Assignment_ Bindu Sagar A-19-09-2021

Inference :-

The columns which have an outlier :-


Sugars

Protien

In [21]:
plt.figure(figsize=(15,10))

sns.boxplot(data=df[['Vitamin A (% Daily Value)', 'Vitamin C (% Daily Value)', 'Calc

file:///C:/Users/91837/Downloads/Mcdonald Assignment_ Bindu Sagar A-19-09-2021.html 13/22


9/19/21, 12:15 AM Mcdonald Assignment_ Bindu Sagar A-19-09-2021

Inference :-

The columns which have an outlier :-


Vitamin A (% Daily Value)

Vitamin C (% Daily Value)

Calcium (% Daily Value)

Iron (% Daily Value)

Q3. Which variables have the highest


correlation? Plot them and find out the value
?

Ans. For representing the variables with the Highest correlation, I


will be selecting the variable - pair which has correlation value of
atleast 50% and higher. I have selected 50% value, as variables
file:///C:/Users/91837/Downloads/Mcdonald Assignment_ Bindu Sagar A-19-09-2021.html 14/22
9/19/21, 12:15 AM Mcdonald Assignment_ Bindu Sagar A-19-09-2021

having 50% or Higher correlational value represents a High


degree of inter - dependence on each other.

In [22]:
correlation = df.corr()

correlation

Out[22]: Saturated
Total Fat
Calories Saturated Fat (%
Calories Total Fat (% Daily Trans Fat Cholester
from Fat Fat Daily
Value)
Value)

Calories 1.000000 0.904588 0.904409 0.904123 0.845564 0.847631 0.522441 0.5963

Calories from
0.904588 1.000000 0.999663 0.999725 0.847008 0.849592 0.433686 0.6821
Fat

Total Fat 0.904409 0.999663 1.000000 0.999765 0.846707 0.849293 0.431453 0.6805

Total Fat (%
0.904123 0.999725 0.999765 1.000000 0.847379 0.849973 0.433016 0.6809
Daily Value)

Saturated Fat 0.845564 0.847008 0.846707 0.847379 1.000000 0.999279 0.620611 0.6312

Saturated Fat
(% Daily 0.847631 0.849592 0.849293 0.849973 0.999279 1.000000 0.620210 0.6336
Value)

Trans Fat 0.522441 0.433686 0.431453 0.433016 0.620611 0.620210 1.000000 0.2539

Cholesterol 0.596399 0.682161 0.680547 0.680940 0.631210 0.633603 0.253935 1.0000

Cholesterol (%
0.595208 0.681607 0.680000 0.680378 0.630334 0.632712 0.251502 0.9998
Daily Value)

Sodium 0.712309 0.846624 0.846158 0.846728 0.584075 0.588694 0.187580 0.6243

Sodium (%
0.713415 0.847276 0.846780 0.847368 0.585323 0.589958 0.188339 0.6247
Daily Value)

Carbohydrates 0.781539 0.461672 0.461213 0.460516 0.591261 0.591322 0.463250 0.2709

Carbohydrates
(% Daily 0.781242 0.461463 0.461005 0.460298 0.591743 0.591655 0.462891 0.2726
Value)

Dietary Fiber 0.538894 0.581274 0.580837 0.580592 0.351818 0.356831 0.054918 0.4355

Dietary Fiber
(% Daily 0.540014 0.575621 0.575206 0.575033 0.347152 0.351797 0.058301 0.4402
Value)

Sugars 0.259598 -0.115285 -0.115446 -0.115761 0.197734 0.195928 0.334756 -0.1355

Protein 0.787847 0.807913 0.807773 0.807922 0.603028 0.606581 0.388249 0.5615

Vitamin A (%
0.108844 0.056731 0.054434 0.054038 0.064972 0.065376 0.075833 0.0802
Daily Value)

Vitamin C (%
-0.068747 -0.087331 -0.089354 -0.089353 -0.179672 -0.178059 -0.076612 -0.0829
Daily Value)

Calcium (%
0.428426 0.161034 0.162860 0.162031 0.403311 0.401139 0.385331 0.1320
Daily Value)

file:///C:/Users/91837/Downloads/Mcdonald Assignment_ Bindu Sagar A-19-09-2021.html 15/22


9/19/21, 12:15 AM Mcdonald Assignment_ Bindu Sagar A-19-09-2021

Saturated
Total Fat
Calories Saturated Fat (%
Calories Total Fat (% Daily Trans Fat Cholester
from Fat Fat Daily
Value)
Value)

Iron (% Daily
0.643552 0.735894 0.734685 0.735478 0.578062 0.580488 0.325476 0.6550
Value)

21 rows × 21 columns

In [23]:
plt.figure(figsize=(15,10))

sns.heatmap(correlation,annot = True, cmap='Greens')

Out[23]: <AxesSubplot:>

Inference :-

List of Variables which have Correlation with each other.

file:///C:/Users/91837/Downloads/Mcdonald Assignment_ Bindu Sagar A-19-09-2021.html 16/22


9/19/21, 12:15 AM Mcdonald Assignment_ Bindu Sagar A-19-09-2021

This list is with respect to Calories :-


Calories & Iron [ 0.64 ]

Calories & Sodium [ 0.71 ]

Calories & Cholestrol [ 0.68 ]

Calories & Saturated Fat [ 0.85 ]

This list is with respect to Total Fat :-


Total Fat & Iron [ 0.73 ]

Total Fat & Protien [ 0.81 ]

Total Fat & Dietary Fiber [ 0.58 ]

Total Fat & Sodium [ 0.85 ]

Total Fat & Cholestrol [ 0.68 ]

Total Fat & Saturated Fat [ 0.85 ]

This list is with respect to Saturated Fat :-


Saturated Fat & Iron [ 0.58 ]

Saturated Fat & Protien [ 0.6 ]

Saturated Fat & Carbohydrates [ 0.58 ]

Saturated Fat & Sodium [ 0.58 ]

Saturated Fat & Cholestrol [ 0.63 ]

Total Fat & Trans Fat [ 0.62 ]

This list is with respect to Cholestrol :-


Cholestrol & Iron [ 0.65 ]

Cholestrol & Protien [ 0.56 ]

Cholestrol & Sodium [ 0.62 ]

This list is with respect to Sodium :-


file:///C:/Users/91837/Downloads/Mcdonald Assignment_ Bindu Sagar A-19-09-2021.html 17/22
9/19/21, 12:15 AM Mcdonald Assignment_ Bindu Sagar A-19-09-2021

Sodium & Iron [ 0.87 ]

Sodium & Protien [ 0.87 ]

Sodium & Dietary Fiber [ 0.69 ]

This list is with respect to Carbohydrates :-


Carbohydrates & Calcium [ 0.59 ]

Carbohydrates & Sugars [ 0.76 ]

This list is with respect to Dietary Fiber :-


Dietary Fiber & Iron [ 0.74 ]

This list is with respect to Sugars :-


Sugars & Calcium [ 0.6 ]

This list is with respect to Protien :-


Protien & Iron [ 0.79 ]

The above list help us to understand Food Nutrition in a better


way.

By understanding the correlation between the Food


constituents like Protien, Iron,

Calcium, Vitamin A etc, of the food we eat.

We can now, go ahead select and eat food items that are
according to our own
Fitness Goals or Health Goals.

file:///C:/Users/91837/Downloads/Mcdonald Assignment_ Bindu Sagar A-19-09-2021.html 18/22


9/19/21, 12:15 AM Mcdonald Assignment_ Bindu Sagar A-19-09-2021

Q4. Which category contributes to the


maximum % of Cholesterol in a diet (% daily
value)?

In [24]:
df['Category'].nunique()

print('The number of Categories is -', df['Category'].nunique())

The number of Categories is - 9

In [25]:
df.groupby('Category')['Cholesterol (% Daily Value)'].sum()

Out[25]: Category

Beef & Pork 434

Beverages 5

Breakfast 2140

Chicken & Fish 681

Coffee & Tea 891

Desserts 34

Salads 104

Smoothies & Shakes 412

Snacks & Sides 81

Name: Cholesterol (% Daily Value), dtype: int64

In [26]:
x= pd.pivot_table(df, 'Cholesterol (% Daily Value)', index=['Category'])

df1 = x.sort_values(('Cholesterol (% Daily Value)'), ascending=False)

df1

Out[26]: Cholesterol (% Daily Value)

Category

Breakfast 50.952381

Beef & Pork 28.933333

Chicken & Fish 25.222222

Salads 17.333333

Smoothies & Shakes 14.714286

Coffee & Tea 9.378947

Snacks & Sides 6.230769

Desserts 4.857143

Beverages 0.185185

file:///C:/Users/91837/Downloads/Mcdonald Assignment_ Bindu Sagar A-19-09-2021.html 19/22


9/19/21, 12:15 AM Mcdonald Assignment_ Bindu Sagar A-19-09-2021

There is a list above wherein we can see all the 9 different


Categories like Breakfast, Salads, Desserts, Beverages etc.

Now, every Category has a corresponding value of Cholesterol


(% Daily Value).

We have sorted and arranged the Categories from High to Low


based on the Cholesterol (% Daily Value).

Q5. Which item contributes maximum to the


Sodium intake?

<br /

In [27]:
df['Item'].nunique()

print('The different type of Food items available at McD are -', df['Item'].nunique(

The different type of Food items available at McD are - 260

In [28]:
Y = pd.pivot_table(df, 'Sodium', index=['Item'])

df2 = Y.sort_values(('Sodium'), ascending=False)

df2.head(10)

Out[28]: Sodium

Item

Chicken McNuggets (40 piece) 3600

Big Breakfast with Hotcakes and Egg Whites (Large Biscuit) 2290

Big Breakfast with Hotcakes (Large Biscuit) 2260

Big Breakfast with Hotcakes and Egg Whites (Regular Biscuit) 2170

Big Breakfast with Hotcakes (Regular Biscuit) 2150

Chicken McNuggets (20 piece) 1800

Bacon Clubhouse Crispy Chicken Sandwich 1720

Big Breakfast with Egg Whites (Large Biscuit) 1700

Big Breakfast (Large Biscuit) 1680

Big Breakfast with Egg Whites (Regular Biscuit) 1590

file:///C:/Users/91837/Downloads/Mcdonald Assignment_ Bindu Sagar A-19-09-2021.html 20/22


9/19/21, 12:15 AM Mcdonald Assignment_ Bindu Sagar A-19-09-2021

Inference :-

The item with the Highest Sodium content is Chicken


McNuggets (40 piece)

Q6. Which 4 food items contains the most


amount of Saturated Fat ?

In [29]:
Z = pd.pivot_table(df, 'Saturated Fat', index=['Item'])

df3 = Z.sort_values(('Saturated Fat'), ascending=False)

df3

Out[29]: Saturated Fat

Item

McFlurry with M&M’s Candies (Medium) 20.0

Big Breakfast with Hotcakes (Large Biscuit) 20.0

Chicken McNuggets (40 piece) 20.0

Frappé Chocolate Chip (Large) 20.0

Double Quarter Pounder with Cheese 19.0

... ...

Diet Dr Pepper (Small) 0.0

Diet Dr Pepper (Medium) 0.0

Diet Dr Pepper (Large) 0.0

Diet Dr Pepper (Child) 0.0

Minute Maid Orange Juice (Large) 0.0

260 rows × 1 columns

file:///C:/Users/91837/Downloads/Mcdonald Assignment_ Bindu Sagar A-19-09-2021.html 21/22


9/19/21, 12:15 AM Mcdonald Assignment_ Bindu Sagar A-19-09-2021

Inference :-

The items with the Highest SaturatedF at content are :-

McFlurry with M&M’s Candies (Medium)

Big Breakfast with Hotcakes (Large Biscuit)

Chicken McNuggets (40 piece)

Frappé Chocolate Chip (Large)

The End

file:///C:/Users/91837/Downloads/Mcdonald Assignment_ Bindu Sagar A-19-09-2021.html 22/22

You might also like