Swiggy Data Analysis
Swiggy Data Analysis
Swiggy Data Analysis
Libraries -
In [1]: import pandas as pd
import numpy as np
from matplotlib import pyplot as plt
import seaborn as sns
import plotly.express as px
import warnings
warnings.filterwarnings(action = 'ignore')
Reading Data
In [2]: df_Swiggy = pd.read_csv('Swiggy Bangalore Outlet Details.csv', sep = ',')
df_Swiggy
Out[2]:
Shop_Name Cuisine Location Rating Cost_for_Two
1 Mumbai Tiffin North Indian, Home Food, Thalis, Combo Sector 5, HSR 4.4 ₹ 400
2 Sri Krishna sagar South Indian, North Indian, Fast Food, Beverag... 6th Block, Koramangala 4.1 ₹ 126
3 Al Daaz American, Arabian, Chinese, Desserts, Fast Foo... HSR, HSR 4.4 ₹ 400
113 Wok Paper Scissors Pan-Asian, Chinese, Asian JNC Road, Koramangala 3.9 ₹ 219
114 Savoury Restaurant Arabian, Middle Eastern, North Indian, Grill, ... Madiwala, BTM 4.1 ₹ 600
115 Royal Treat North Indian, Chinese, Seafood, Biryani 5th block Koramangala, Koramangala 4.2 ₹ 193
117 Mani's Dum Biryani Andhra, Biryani 1st Block, Koramangala 4.2 ₹ 400
In [3]: df_Swiggy.columns
In [4]: df_Swiggy.isnull().sum()
Out[4]: Shop_Name 0
Cuisine 0
Location 0
Rating 0
Cost_for_Two 0
dtype: int64
In [5]: df_Swiggy.describe()
Out[5]:
Shop_Name Cuisine Location Rating Cost_for_Two
unique 115 79 65 13 30
freq 2 12 13 30 16
In [6]: df_Swiggy.info()
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 118 entries, 0 to 117
Data columns (total 5 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 Shop_Name 118 non-null object
1 Cuisine 118 non-null object
2 Location 118 non-null object
3 Rating 118 non-null object
4 Cost_for_Two 118 non-null object
dtypes: object(5)
memory usage: 4.7+ KB
Out[7]: 0
In [8]: df_Swiggy.head()
Out[8]:
Shop_Name Cuisine Location Rating Cost_for_Two
1 Mumbai Tiffin North Indian, Home Food, Thalis, Combo Sector 5, HSR 4.4 ₹ 400
2 Sri Krishna sagar South Indian, North Indian, Fast Food, Beverag... 6th Block, Koramangala 4.1 ₹ 126
3 Al Daaz American, Arabian, Chinese, Desserts, Fast Foo... HSR, HSR 4.4 ₹ 400
In [9]: df_Swiggy['Rating'].unique()
Out[9]: array(['4.3', '4.4', '4.1', '4.2', '3.9', '3.8', '4', '3.7', '3.6', '4.8',
'4.5', '4.6', '--'], dtype=object)
In [11]: df_Swiggy['Rating'].unique()
Out[11]: array([4.3, 4.4, 4.1, 4.2, 3.9, 3.8, 4. , 3.7, 3.6, 4.8, 4.5, 4.6, 0. ])
In [12]: df_Swiggy['Cost_for_Two'].unique()
Out[12]: array(['₹ 150', '₹ 400', '₹ 126', '₹ 450', '₹ 350', '₹ 200', '₹ 500',
'₹ 247', '₹ 550', '₹ 300', '₹ 129', '₹ 250', '₹ 268', '₹ 600',
'₹ 527', '₹ 130', '₹ 257', '₹ 280', '₹ 399', '₹ 220', '₹ 800',
'₹ 100', '₹ 178', '₹ 120', '₹ 251', '₹ 650', '₹ 132', '₹ 153',
'₹ 219', '₹ 193'], dtype=object)
In [16]: df_Swiggy['Cost_for_Two'].unique()
Out[16]: array([150, 400, 126, 450, 350, 200, 500, 247, 550, 300, 129, 250, 268,
600, 527, 130, 257, 280, 399, 220, 800, 100, 178, 120, 251, 650,
132, 153, 219, 193])
In [18]: df_Swiggy
Out[18]:
Shop_Name Cuisine Location Rating Cost_for_Two (₹)
1 Mumbai Tiffin North Indian, Home Food, Thalis, Combo Sector 5, HSR 4.4 400
2 Sri Krishna sagar South Indian, North Indian, Fast Food, Beverag... 6th Block, Koramangala 4.1 126
3 Al Daaz American, Arabian, Chinese, Desserts, Fast Foo... HSR, HSR 4.4 400
113 Wok Paper Scissors Pan-Asian, Chinese, Asian JNC Road, Koramangala 3.9 219
114 Savoury Restaurant Arabian, Middle Eastern, North Indian, Grill, ... Madiwala, BTM 4.1 600
115 Royal Treat North Indian, Chinese, Seafood, Biryani 5th block Koramangala, Koramangala 4.2 193
117 Mani's Dum Biryani Andhra, Biryani 1st Block, Koramangala 4.2 400
In [19]: df_Swiggy.dtypes
In [20]: df_Swiggy.info()
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 118 entries, 0 to 117
Data columns (total 5 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 Shop_Name 118 non-null object
1 Cuisine 118 non-null object
2 Location 118 non-null object
3 Rating 118 non-null float64
4 Cost_for_Two (₹) 118 non-null int32
dtypes: float64(1), int32(1), object(3)
memory usage: 4.3+ KB
In [21]: df_Swiggy.describe()
Out[21]:
Rating Cost_for_Two (₹)
In [22]: df_Swiggy.head()
Out[22]:
Shop_Name Cuisine Location Rating Cost_for_Two (₹)
1 Mumbai Tiffin North Indian, Home Food, Thalis, Combo Sector 5, HSR 4.4 400
2 Sri Krishna sagar South Indian, North Indian, Fast Food, Beverag... 6th Block, Koramangala 4.1 126
3 Al Daaz American, Arabian, Chinese, Desserts, Fast Foo... HSR, HSR 4.4 400
Out[23]:
Shop_Name Cuisine Location Rating Cost_for_Two (₹)
1 Mumbai Tiffin North Indian, Home Food, Thalis, Combo Sector 5, HSR 4.4 400
2 Sri Krishna sagar South Indian, North Indian, Fast Food, Beverag... 6th Block, Koramangala 4.1 126
3 Al Daaz American, Arabian, Chinese, Desserts, Fast Foo... HSR, HSR 4.4 400
113 Wok Paper Scissors Pan-Asian, Chinese, Asian JNC Road, Koramangala 3.9 219
114 Savoury Restaurant Arabian, Middle Eastern, North Indian, Grill, ... Madiwala, BTM 4.1 600
115 Royal Treat North Indian, Chinese, Seafood, Biryani 5th block Koramangala, Koramangala 4.2 193
117 Mani's Dum Biryani Andhra, Biryani 1st Block, Koramangala 4.2 400
Conclusion:
From this Distribution Plot, We can conclude that More that '50%' of Restaurants are having a Rating greater than "4.1" with a Maximum Rating of
"4.8" which is considered as a decent Rating.
And It also means that, Most of these Restaurants are doing very well & Rated accordingly by the Customers.
In [25]: df_Swiggy['Location'].unique()
In [26]: df_Swiggy['Location'].nunique()
Out[26]: 65
Out[27]:
Shop_Name Cuisine Location Rating Cost_for_Two (₹)
2 Sri Krishna sagar South Indian, North Indian, Fast Food, Beverag... 6th Block, Koramangala 4.1 126
5 Kitchens of Punjab North Indian Koramangala 4th Block, Koramangala 4.2 350
9 Yumlane Pizza Pizzas, Italian, Mexican 9th Main road, Koramangala 3.8 150
113 Wok Paper Scissors Pan-Asian, Chinese, Asian JNC Road, Koramangala 3.9 219
115 Royal Treat North Indian, Chinese, Seafood, Biryani 5th block Koramangala, Koramangala 4.2 193
117 Mani's Dum Biryani Andhra, Biryani 1st Block, Koramangala 4.2 400
64 rows × 5 columns
Out[28]:
Shop_Name Cuisine Location Rating Cost_for_Two (₹)
1 Mumbai Tiffin North Indian, Home Food, Thalis, Combo Sector 5, HSR 4.4 400
3 Al Daaz American, Arabian, Chinese, Desserts, Fast Foo... HSR, HSR 4.4 400
8 Hotel Manu South Indian, Kerala, Chinese, North Indian HSR, HSR 4.1 350
24 New Udupi Grand Chinese, Jain, North Indian, South Indian HSR, HSR 4.3 150
36 Biriyani Zone North Indian, Chinese, Biryani HSR 1st sector, HSR 4.1 600
39 Leon Grill Turkish, Portuguese, American 3rd Sector, HSR 4.3 300
57 Donne Biriyani House South Indian 3rd sector, HSR 4.0 300
71 Nizams Biryani Biryani, Juices, Kebabs Venkatapura Main Rd, Teacher's Colony, Jakkasa... 3.6 200
101 Easy Bites Snacks, American 9th Main Rd, Sector 6, HSR Layout, HSR 3.8 200
107 Junior Kuppanna Chettinad, South Indian Sector 6, HSR 4.0 550
In [29]: swiggy_HSR.shape
Out[29]: (18, 5)
Out[30]:
Shop_Name Cuisine Location Rating Cost_for_Two (₹)
6 99 VARIETY DOSA AND PAV BHAJI- Malli Mane Food... Fast Food, North Indian, Chinese BTM 2nd Stage, BTM 4.1 200
10 Ambur Star Briyani Chinese, South Indian, North Indian, Desserts,... outer ring road, BTM 4.1 500
20 Just Bake - Cakes & confectioners Desserts, Bakery BTM 1st stage, BTM 4.3 300
22 Hotel Godavari North Indian, Chinese, Hyderabadi Marutinagar Main Road, BTM 4.0 400
27 High N Hungry Andhra, Biryani, Chinese, Desserts, Fast Food,... 4th Cross, BTM 4.1 350
31 Bengali Fun Foods North Indian BTM 2nd stage, BTM 4.2 300
35 Hyderabadi Biryani Hub North Indian, Chinese, Biryani 3rd main, BTM 3.9 450
40 Venu's Donne Biryani Biryani Chocolate Factory Road, BTM 4.3 300
42 Swadista Aahar South Indian, Snacks, North Indian, Chinese 16th Main Road, 2nd Stage, BTM 4.1 250
44 Svadu Pure Ghee Sweets Desserts, Fast Food, Sweets, Chaat 1st Stage, BTM 4.1 200
45 Sai Abhiruchi Chinese, South Indian, Andhra, Hyderabadi BTM, BTM 3.7 250
49 Balaji's Veg North Indian, Chinese, South Indian Mico Layout, BTM 4.1 300
51 Donne Biryani Mandi Biryani, Andhra, South Indian BTM, BTM 4.0 150
60 calicut cafe restaurant Fast Food, Beverages BTM, BTM 4.1 280
70 Fattoush Arabian, Beverages, Biryani, Chinese, Desserts... BTM, BTM 3.9 400
76 BIRIYANI TASTE MASTH(BTM) North Indian, South Indian Btm, BTM 4.2 300
79 Tandoori Merchant Andhra, Biryani, Chinese, Desserts, Fast Food,... 4th Cross, BTM 4.2 100
83 Abhiruchi Hotel Chinese, Hyderabadi, Biryani, Indian, South In... BTM, BTM 4.0 250
84 Punjabi Swag Punjabi, North Indian, Chinese, Fast Food, Hea... 16th Main Road, BTM 3.7 400
86 Gyaani Da Punjabi Dhaba North Indian 2nd Stage, BTM 4.0 500
87 Biriyani Bhatti Biryani, Hyderabadi, Andhra, North Indian, Sou... Kuvempu Nagar, Stage 2, BTM 4.1 350
104 R.B Food Point Chinese, North Indian Jay Bheema Nagar, BTM 3.7 350
106 New Tasty Cafeteria Andhra, Chettinad, Chinese, Mughlai, North Indian Maruthi Nagar, BTM 4.0 350
110 Biryani Pot North Indian, Biryani Madiwala Junction, BTM 4.0 500
114 Savoury Restaurant Arabian, Middle Eastern, North Indian, Grill, ... Madiwala, BTM 4.1 600
In [31]: swiggy_BTM.shape
Out[31]: (35, 5)
Area-wise Analysis -
BTM Area
HSR Area
In [34]: sns.countplot(swiggy_HSR['Rating'])
Koramangala Area
Conclusion: As we can see that the Area-wise Rating & Cost for Two varies as following:
1. BTM : Most has 4.0 to 4.2 Rating and Approx. Cost for Two People lies between 200 to 350. (Max. Cost goes upto 600)
2. HSR : Most has 4 or above Rating and Approx. Cost for Two People lies between 300 to 400. (Max. Cost goes upto 800)
3. Koramangala : Most has 4.0 to 4.3 Rating and Approx. Cost for Two People lies between 200 to 350. (Max. Cost goes upto 600)
In [38]: df_Swiggy.head()
Out[38]:
Shop_Name Cuisine Location Rating Cost_for_Two (₹)
1 Mumbai Tiffin North Indian, Home Food, Thalis, Combo Sector 5, HSR 4.4 400
2 Sri Krishna sagar South Indian, North Indian, Fast Food, Beverag... 6th Block, Koramangala 4.1 126
3 Al Daaz American, Arabian, Chinese, Desserts, Fast Foo... HSR, HSR 4.4 400
In [39]: #Q. Analyse "Approx Cost of 2 People" vs "Rating". Find out the relationship between them.
df_Highest_Rated_Restaurants = df_Swiggy[df_Swiggy['Rating'] >= 4.0]
df_Highest_Rated_Restaurants
Out[39]:
Shop_Name Cuisine Location Rating Cost_for_Two (₹)
1 Mumbai Tiffin North Indian, Home Food, Thalis, Combo Sector 5, HSR 4.4 400
2 Sri Krishna sagar South Indian, North Indian, Fast Food, Beverag... 6th Block, Koramangala 4.1 126
3 Al Daaz American, Arabian, Chinese, Desserts, Fast Foo... HSR, HSR 4.4 400
111 Bowl 99 North Indian, South Indian kormangala, Koramangala 4.4 200
114 Savoury Restaurant Arabian, Middle Eastern, North Indian, Grill, ... Madiwala, BTM 4.1 600
115 Royal Treat North Indian, Chinese, Seafood, Biryani 5th block Koramangala, Koramangala 4.2 193
117 Mani's Dum Biryani Andhra, Biryani 1st Block, Koramangala 4.2 400
92 rows × 5 columns
Out[40]:
Shop_Name Rating Cost_for_Two (₹)
92 rows × 3 columns
Out[41]:
Shop_Name Rating Cost_for_Two (₹)
1 99 VARIETY DOSA AND PAV BHAJI- Malli Mane Food... 4.1 200.0
91 rows × 3 columns
Rating_Indicator
4.8 4.8
4.7
4.7
4.6
4.6
4.5
4.5
Rating
4.4
4.4
4.3
4.3
4.2
4.2
4.1
4.1
4
4
100 200 300 400 500 600 700 800
Conclusion:
From this 'Scatter Plot', We can clearly say that - Bigger the Bubble, Higher the Price is... Similarly, Smaller the Bubble, Lesser the Price is...
Furthermore, We can also say that, Most of the Affordable/Budgeted Restaurants are having Excellant Rating as well.
Same we can see, For Approx. Cost of "200", "150", "250", and "450", the Ratings were "4.8", "4.6", and "4.5" respectively.
This might be because Most of the people prefer Affordable/Budget-Restaurants which also provides good quality of Cuisines.
and On the other hand, There are few Expensive Restaurants who doesn't have that much Rating and they are Expensive.
Restaurants which Costs around "600" to "800" for Two People are having the Ratings in between '4.0' to '4.1' which is too less as compared to
Affordable/Budgeted Restaurants.
So, That's a Conclusion we can drawn from this 'Scatter Plot'.
Out[44]:
Shop_Name Cuisine Location Rating Cost_for_Two (₹)
1 Mumbai Tiffin North Indian, Home Food, Thalis, Combo Sector 5, HSR 4.4 400
2 Sri Krishna sagar South Indian, North Indian, Fast Food, Beverag... 6th Block, Koramangala 4.1 126
3 Al Daaz American, Arabian, Chinese, Desserts, Fast Foo... HSR, HSR 4.4 400
110 Biryani Pot North Indian, Biryani Madiwala Junction, BTM 4.0 500
111 Bowl 99 North Indian, South Indian kormangala, Koramangala 4.4 200
115 Royal Treat North Indian, Chinese, Seafood, Biryani 5th block Koramangala, Koramangala 4.2 193
117 Mani's Dum Biryani Andhra, Biryani 1st Block, Koramangala 4.2 400
82 rows × 5 columns
Out[45]:
Shop_Name Rating Cost_for_Two (₹)
1 99 VARIETY DOSA AND PAV BHAJI- Malli Mane Food... 4.1 200.0
81 rows × 3 columns
Out[46]:
Shop_Name Rating Cost_for_Two (₹)
81 rows × 3 columns
In [48]: #Q. Top 15 Cheapest & Highest Rated Restaurants with Approx. Cost for 2 People:
df_Cheapest_Restaurants = df_Affordable_Restaurants.sort_values(by = 'Cost_for_Two (₹)', ascending = True)
df_Cheapest_Restaurants
Out[48]:
Shop_Name Rating Cost_for_Two (₹)
81 rows × 3 columns
Top 15 Cheapest & Highest Rated Restaurants with Approx. Cost for 2 People
Rating
4.6
150
Approx. Cost_for_Two (₹)
4.5
4.4
100
4.3
4.2
50
4.1
4
0
Ta 99 NI Sr Ma Do De Ne Ka Ma Sh Na Do Ho Kh
n do VA C iK aD nn lhi w nti du aw tur nne tel aw
ori RI Na ris iH eB Fo Ud Sw rai arm al Sa aK
Me ET tur hn att iry o up ee Idl Ice Bir vit arp
YD a l Ic as an dP iG ts yS aI Cr ya ha
rch ag i iH oin ran nc ea ni Fa o
an OS eC ar t ho Ma
t AA rea ou d p m nd mi
ms se i ly
ND Re
JU s tau
I CE ran
-M t
all
im
an
ef
oo
dc
ou
rt
Restaurant_Name
In [50]: #Q. Top 15 Expensive & Highest Rated Restaurants with Approx. Cost for 2 People:
df_Expensive_Restaurants = df_Highest_Rated_Restaurants.sort_values(by = 'Cost_for_Two (₹)', ascending = False)
df_Expensive_Restaurants
Out[50]:
Shop_Name Rating Cost_for_Two (₹)
91 rows × 3 columns
Top 15 Expensive & Highest Rated Restaurants with Approx. Cost for 2 People
800 Rating
4.4
700
4.35
Approx. Cost_for_Two (₹)
600
4.3
500 4.25
400 4.2
300 4.15
200 4.1
4.05
100
4
0
Pu Din Sa Ta Piz Bir Na Ju Me Ch Ma BIR Am Gy Bir
nja d v ou c oB z aH iya ga nio g ha in d ee YA bu aa ya
bi igu ry n rju rK aP NI rS ni ni
Ra lT Re ell ut iZ na up na ea na tar Da Po
so ha on pa Fo rl Ho CR Pu t
i lap sta e nn od tel AF Br
ak ura a s TS iya nja
att nt ni bi
iB Dh
iriy ab
an a
i
Restaurant_Name
Cuisine Analysis:
In [52]: df_Swiggy['Cuisine'] = df_Swiggy['Cuisine'].str.title()
df_Swiggy['Cuisine']
Out[52]: 0 Sweets
1 North Indian, Home Food, Thalis, Combo
2 South Indian, North Indian, Fast Food, Beverag...
3 American, Arabian, Chinese, Desserts, Fast Foo...
4 Chinese, Thai
...
113 Pan-Asian, Chinese, Asian
114 Arabian, Middle Eastern, North Indian, Grill, ...
115 North Indian, Chinese, Seafood, Biryani
116 North Indian
117 Andhra, Biryani
Name: Cuisine, Length: 118, dtype: object
In [53]: df_Swiggy['Cuisine'].unique()
In [54]: freq_dict = {}
for i in df_Swiggy['Cuisine'].unique():
Cuisines_Lists = i.split(',')
for Cuisine in Cuisines_Lists:
Cuisine = Cuisine.lstrip(' ')
if Cuisine in freq_dict:
freq_dict[Cuisine] = freq_dict[Cuisine] + 1
else:
freq_dict[Cuisine] = 1
print(freq_dict)
print()
print('Total Records: \t', len(freq_dict))
{'Sweets': 2, 'North Indian': 32, 'Home Food': 2, 'Thalis': 1, 'Combo': 1, 'South Indian': 23, 'Fast Food': 16, 'Beve
rages': 9, 'Jain': 2, 'American': 8, 'Arabian': 4, 'Chinese': 35, 'Desserts': 15, 'Mughlai': 7, 'Thai': 2, 'Italian':
4, 'Kerala': 6, 'Pizzas': 5, 'Mexican': 3, 'Andhra': 12, 'Seafood': 8, 'Biryani': 18, 'Indian': 5, 'Rajasthani': 1,
'Bakery': 2, 'Healthy Food': 4, 'Hyderabadi': 5, 'Snacks': 4, 'Turkish': 2, 'Portuguese': 2, 'Chaat': 2, 'Asian': 3,
'Continental': 3, 'Mediterranean': 1, 'Lebanese': 1, 'Cafe': 2, 'Salads': 2, 'Pastas': 1, 'Punjabi': 2, 'Juices': 2,
'Kebabs': 2, 'Grill': 2, 'Ice Cream': 2, 'Tandoor': 1, 'Chettinad': 2, 'Pan-Asian': 2, 'Oriental': 1, 'Middle Easter
n': 1}
Total Records: 48
Here you can see the different types of cusine present and the number of shops sell them
In [55]: freq_dict.items()
Out[55]: dict_items([('Sweets', 2), ('North Indian', 32), ('Home Food', 2), ('Thalis', 1), ('Combo', 1), ('South Indian', 23),
('Fast Food', 16), ('Beverages', 9), ('Jain', 2), ('American', 8), ('Arabian', 4), ('Chinese', 35), ('Desserts', 15),
('Mughlai', 7), ('Thai', 2), ('Italian', 4), ('Kerala', 6), ('Pizzas', 5), ('Mexican', 3), ('Andhra', 12), ('Seafoo
d', 8), ('Biryani', 18), ('Indian', 5), ('Rajasthani', 1), ('Bakery', 2), ('Healthy Food', 4), ('Hyderabadi', 5), ('S
nacks', 4), ('Turkish', 2), ('Portuguese', 2), ('Chaat', 2), ('Asian', 3), ('Continental', 3), ('Mediterranean', 1),
('Lebanese', 1), ('Cafe', 2), ('Salads', 2), ('Pastas', 1), ('Punjabi', 2), ('Juices', 2), ('Kebabs', 2), ('Grill',
2), ('Ice Cream', 2), ('Tandoor', 1), ('Chettinad', 2), ('Pan-Asian', 2), ('Oriental', 1), ('Middle Eastern', 1)])
In [59]: df_Cuisine_Analysis
Out[59]:
Cuisine Count
0 Sweets 2
1 North Indian 32
2 Home Food 2
3 Thalis 1
4 Combo 1
5 South Indian 23
6 Fast Food 16
7 Beverages 9
8 Jain 2
9 American 8
10 Arabian 4
11 Chinese 35
12 Desserts 15
13 Mughlai 7
14 Thai 2
15 Italian 4
16 Kerala 6
17 Pizzas 5
18 Mexican 3
19 Andhra 12
20 Seafood 8
21 Biryani 18
22 Indian 5
23 Rajasthani 1
24 Bakery 2
25 Healthy Food 4
26 Hyderabadi 5
27 Snacks 4
28 Turkish 2
29 Portuguese 2
30 Chaat 2
31 Asian 3
32 Continental 3
33 Mediterranean 1
34 Lebanese 1
35 Cafe 2
36 Salads 2
37 Pastas 1
38 Punjabi 2
39 Juices 2
40 Kebabs 2
41 Grill 2
42 Ice Cream 2
43 Tandoor 1
44 Chettinad 2
45 Pan-Asian 2
46 Oriental 1
47 Middle Eastern 1
Chinese
North Indian
North Indian Chinese tern
South Indian
11.8%
Eas al
dle 68% ent
Mid 0.3 Ori 68% r
12.9%
0.3 doo
Tan 68%
0.3 tas
Pas 68%
Biryani
0.3 se
ane
Leb 8% an
0.36 ane
iterr 8% ani
So
Med 0.36 asth
Raj 8%
bo
0.36
Com 8%
0.36 lis
Tha 8%
uth
0.36
ian
n-As
Pa 35% d
0.7 ina
Fast Food
8.4 Indi
ett
Ch 35%
0.7 eam
Cr
Ice 35%
6% an Desserts
0.7 ll
Gri
35%
0.7
abs
Keb
0.735%
es
Juic
Andhra
5%
0.73
Punjabi
0.735%
s
Salad
%
0.735
Beverages
Cafe
Biryani
0.735%
Chaat
0.735%
Portuguese
6.62% American
0.735%
Turkish
0.735%
Bakery
0.735%
Seafood
Thai
0.735%
Jain
0.735%
d
Foo
Home Food
Mughlai
0.735%
Fast %
Swee
ts
0.735
Co ntinent
%
1.1% al
5.88 Asian
1.1
Mex %
Kerala
ica
ts
1.1% n
Sn
Pizzas
er He ck a
alt 1.47 s
ss % h
1.4 y Fo
%
De .51 Indian
7% od
Ita
1 lia
5 Ar .47 n
1.4 abia
%
Hyderabadi
4.4 dhra
Hy 1.8 dian
7% n
d 4% er
3.31 ges
1%
ab
Arabian
ad
An
In 4%
%
i
n
era
1.8 as
Piz 4%
America
Seafood
Mughl
2.94%
1.8
Kera
2.94%
Italian
2.57%
2.21
z
Bev
la
%
Healthy Food
ai
Conclusion:
From the above Visualizations, We can say, Most of the Resturants sell "Chinese" which is around '12.9%' followed by "North Indian" & "South
Indian" Cuisines which are around '11.8%' & '8.46%'.
So, We can also infer that Most of the people are fond of these Cusines.
Area-wise Analysis:
BTM Area
In [62]: swiggy_BTM['Cuisine'].unique()
In [63]: freq_BTM = {}
for i in swiggy_BTM['Cuisine'].unique():
Cuisine_List = i.split(',')
for Cuisine in Cuisine_List:
Cuisine = Cuisine.lstrip()
if Cuisine in freq_BTM:
freq_BTM[Cuisine] = freq_BTM[Cuisine] + 1
else:
freq_BTM[Cuisine] = 1
print(freq_BTM)
print()
print(len(freq_BTM))
{'Fast Food': 6, 'North Indian': 16, 'Chinese': 18, 'Italian': 1, 'South Indian': 10, 'Desserts': 6, 'Kerala': 4, 'An
dhra': 7, 'Beverages': 4, 'Mughlai': 3, 'Seafood': 3, 'Bakery': 1, 'Hyderabadi': 4, 'Indian': 2, 'Biryani': 8, 'Snack
s': 1, 'Sweets': 1, 'Chaat': 1, 'Arabian': 2, 'Thai': 1, 'Tandoor': 1, 'Punjabi': 1, 'Healthy Food': 1, 'Chettinad':
1, 'Middle Eastern': 1, 'Grill': 1}
26
In [64]: freq_BTM.items()
Out[64]: dict_items([('Fast Food', 6), ('North Indian', 16), ('Chinese', 18), ('Italian', 1), ('South Indian', 10), ('Dessert
s', 6), ('Kerala', 4), ('Andhra', 7), ('Beverages', 4), ('Mughlai', 3), ('Seafood', 3), ('Bakery', 1), ('Hyderabadi',
4), ('Indian', 2), ('Biryani', 8), ('Snacks', 1), ('Sweets', 1), ('Chaat', 1), ('Arabian', 2), ('Thai', 1), ('Tandoo
r', 1), ('Punjabi', 1), ('Healthy Food', 1), ('Chettinad', 1), ('Middle Eastern', 1), ('Grill', 1)])
In [66]: dict_BTM = {
'Cuisine' : Cuisine,
'Count' : freq
}
df_Cuisine_BTM = pd.DataFrame(dict_BTM)
df_Cuisine_BTM.head()
Out[66]:
Cuisine Count
0 Fast Food 6
1 North Indian 16
2 Chinese 18
3 Italian 1
4 South Indian 10
plt.xticks(rotation = 90)
plt.title('Cuisines Analysis - BTM (Bangalore)', fontsize = 14, fontweight = 'bold', fontstyle = 'italic')
plt.xlabel('Cuisine', fontsize = 11, fontweight = 'bold')
plt.ylabel('Number of Restaurants', fontsize = 11, fontweight = 'bold')
plt.show()
Chinese
North Indian
South Indian
North Indian
Chinese Biryani
15.2%
17.1%
Gril
l Andhra
0. 952%
rn
Fast Food
ste
le Ea
Midd 52%
0.9 inad
Chett %
0.952%
Food
Desserts
Punjabi
9.52% 0.952%
Tandoor
0.952%
Thai
Kerala
0.952%
Beverages
Chaat
0.952%
Sweets
0.952%
Hyderabadi
Snacks
0.952%
Biryani
Bakery
0.952%
Mughlai
Italian
0.952%
7.62% Arabi
an
1.9%
Ind Seafood
ia
Se 1.9 n
a %
Indian
Andhra 2. food
M 86% Arabian
u
6.67% 2. ghl
Hy 3.81
5.7 Food
86 ai
Italian
de %
%
Bev 1%
1%
ra
Desserts
ba
Bakery
st
5.71%
3.8
era
Fa
di
Kerala
3.81%
Snacks
ges
Sweets
Conclusion:
From the above Visualizations, We can say, In BTM Area, Most of the Resturants sell "Chinese" which is around '17.1%' followed by "North Indian" &
"South Indian" Cuisines which are around '15.2%' & '9.52%'.
So, We can also infer that Most of the people are fond of these Cusines.
HSR Area
In [69]: swiggy_HSR['Cuisine'].unique()
In [70]: freq_HSR = {}
for i in swiggy_HSR['Cuisine'].unique():
Cuisine_List = i.split(',')
for Cuisine in Cuisine_List:
Cuisine = Cuisine.lstrip()
if Cuisine in freq_HSR:
freq_HSR[Cuisine] = freq_HSR[Cuisine] + 1
else:
freq_HSR[Cuisine] = 1
print(freq_HSR)
print()
print(len(freq_HSR))
{'North Indian': 6, 'Home Food': 1, 'Thalis': 1, 'Combo': 1, 'American': 3, 'Arabian': 1, 'Chinese': 4, 'Desserts':
3, 'Fast Food': 1, 'Mughlai': 1, 'South Indian': 4, 'Kerala': 1, 'Indian': 1, 'Rajasthani': 1, 'Jain': 1, 'Biryani':
4, 'Turkish': 1, 'Portuguese': 1, 'Andhra': 1, 'Bakery': 1, 'Juices': 1, 'Kebabs': 1, 'Snacks': 1, 'Chettinad': 1}
24
In [71]: freq_HSR.items()
Out[71]: dict_items([('North Indian', 6), ('Home Food', 1), ('Thalis', 1), ('Combo', 1), ('American', 3), ('Arabian', 1), ('Ch
inese', 4), ('Desserts', 3), ('Fast Food', 1), ('Mughlai', 1), ('South Indian', 4), ('Kerala', 1), ('Indian', 1), ('R
ajasthani', 1), ('Jain', 1), ('Biryani', 4), ('Turkish', 1), ('Portuguese', 1), ('Andhra', 1), ('Bakery', 1), ('Juice
s', 1), ('Kebabs', 1), ('Snacks', 1), ('Chettinad', 1)])
In [73]: dict_HSR = {
'Cuisine' : Cuisine,
'Count' : freq
}
df_Cuisine_HSR = pd.DataFrame(dict_HSR)
df_Cuisine_HSR.head()
Out[73]:
Cuisine Count
0 North Indian 6
1 Home Food 1
2 Thalis 1
3 Combo 1
4 American 3
plt.xticks(rotation = 90)
plt.title('Cuisines Analysis - HSR (Bangalore)', fontsize = 14, fontweight = 'bold', fontstyle = 'italic')
plt.xlabel('Cuisine', fontsize = 11, fontweight = 'bold')
plt.ylabel('Number of Restaurants', fontsize = 11, fontweight = 'bold')
plt.show()
North Indian
Chinese Chinese
9.52% North Indian South Indian
14.3% d Biryani
South Indian ina
ett
Ch .38% American
9.52% 2 s
n ack
S 8%
2.3 Desserts
abs
Keb
2 8
.3 % Home Food
Juices
Thalis
Biryani 2.38%
9.52% Bakery Combo
2.38%
Andhra Arabian
2.38%
Portu
gues
Fast Food
2.38 e
American Turk
% Mughlai
7.14% 2.3 ish Kerala
8%
Ja
Ra 2. in
ja 38% Indian
2 st
Desserts .3 ha
8% n
i Rajasthani
7.14%
In 8%
dia
2. rala
Jain
2.3 ood
Ke 8%
3
n
2.3 lai
Mu %
Fast Fo
eF
8%
2.3
Turkish
2.38%
Arabian
gh
Hom
Thalis
Combo
2.38%
2.38%
2.38%
8
od
Portuguese
Conclusion:
From the above Visualizations, We can say, In HSR Area, "North Indian" Cuisines are dominated by around '14.3%' followed by "Chinese" & "South
Indian" Cuisines '9.52%' & '9.52%' Restaurants respectively.
So, We can also infer that - In HSR Area, We may have more "North Indian" people staying there.
Koramangala Area
In [76]: swiggy_Koramangala['Cuisine'].unique()
Out[76]: array(['Sweets', 'South Indian, North Indian, Fast Food, Beverages, Jain',
'Chinese, Thai', 'North Indian', 'Pizzas, Italian, Mexican',
'Desserts', 'Chinese, Andhra, Biryani, Seafood', 'Chinese',
'South Indian, Chinese, Desserts, North Indian',
'Arabian, Fast Food', 'Desserts, Beverages',
'Chinese, Healthy Food, North Indian', 'Fast Food',
'North Indian, South Indian, Chinese', 'American, Fast Food',
'Biryani, Seafood, North Indian, Chinese, Desserts, Andhra, South Indian',
'Snacks, American', 'South Indian', 'Mexican', 'Pizzas, Fast Food',
'Biryani, Mughlai, South Indian', 'Chinese, Asian',
'Italian, Desserts, Pizzas',
'Chinese, Continental, Italian, Mediterranean, Thai, Lebanese, American, Asian, Beverages, Bakery, Biryani, Ca
fe, Desserts, Healthy Food, Mexican, North Indian, Salads, Pizzas',
'Biryani',
'Pizzas, Chinese, Pastas, Salads, American, Continental',
'Chinese, South Indian, North Indian, Fast Food',
'Biryani, South Indian, North Indian, Fast Food, Andhra, Beverages, Mughlai, Seafood, Punjabi, Hyderabadi, Chi
nese',
'South Indian, Biryani, Kerala, North Indian, Chinese',
'Andhra, South Indian', 'Beverages, Cafe, Snacks',
'Turkish, Portuguese, American, Grill',
'Home Food, Healthy Food, Indian', 'Ice Cream', 'American',
'Fast Food, Juices, North Indian',
'North Indian, Chaat, Snacks, Fast Food',
'Desserts, Mughlai, Seafood', 'Ice Cream, Desserts', 'Italian',
'Biryani, Kebabs', 'Continental, Indian, Pan-Asian, Oriental',
'North Indian, South Indian', 'Andhra, Biryani',
'Pan-Asian, Chinese, Asian',
'North Indian, Chinese, Seafood, Biryani'], dtype=object)
In [77]: freq_Koramangala = {}
for i in swiggy_Koramangala['Cuisine'].unique():
Cuisine_List = i.split(',')
for Cuisine in Cuisine_List:
Cuisine = Cuisine.lstrip()
if Cuisine in freq_Koramangala:
freq_Koramangala[Cuisine] = freq_Koramangala[Cuisine] + 1
else:
freq_Koramangala[Cuisine] = 1
print(freq_Koramangala)
print()
print(len(freq_Koramangala))
{'Sweets': 1, 'South Indian': 11, 'North Indian': 14, 'Fast Food': 9, 'Beverages': 5, 'Jain': 1, 'Chinese': 15, 'Tha
i': 2, 'Pizzas': 5, 'Italian': 4, 'Mexican': 3, 'Desserts': 8, 'Andhra': 5, 'Biryani': 10, 'Seafood': 5, 'Arabian':
1, 'Healthy Food': 3, 'American': 6, 'Snacks': 3, 'Mughlai': 3, 'Asian': 3, 'Continental': 3, 'Mediterranean': 1, 'Le
banese': 1, 'Bakery': 1, 'Cafe': 2, 'Salads': 2, 'Pastas': 1, 'Punjabi': 1, 'Hyderabadi': 1, 'Kerala': 1, 'Turkish':
1, 'Portuguese': 1, 'Grill': 1, 'Home Food': 1, 'Indian': 2, 'Ice Cream': 2, 'Juices': 1, 'Chaat': 1, 'Kebabs': 1, 'P
an-Asian': 2, 'Oriental': 1}
42
In [79]: dict_Koramangala = {
'Cuisine' : Cuisine,
'Count' : freq
}
df_Cuisine_Koramangala = pd.DataFrame(dict_Koramangala)
df_Cuisine_Koramangala.head()
Out[79]:
Cuisine Count
0 Sweets 1
1 South Indian 11
2 North Indian 14
3 Fast Food 9
4 Beverages 5
plt.xticks(rotation = 90)
plt.title('Cuisines Analysis - Koramangala (Bangalore)', fontsize = 14, fontweight = 'bold', fontstyle = 'italic')
plt.xlabel('Cuisine', fontsize = 11, fontweight = 'bold')
plt.ylabel('Number of Restaurants', fontsize = 11, fontweight = 'bold')
plt.show()
Chinese
North Indian North Indian
Chinese
Ke 69% al
0. nt
Orie
0. babs
%
South Indian
69
9.66%
0. haat
%
10.3%
C
69
ices
So Ju 69%
0.
Fo
e %
od
l
ut
Hom 0.69 Gril %
Biryani
69
0. ese
h
gu
rtu %
Po 0.69 rkish
7. I
Tu %
59 ndi
0.69 rala
Ke 9%
Fast Food
0.6 adi
% a
rab
de 9%
Hy
0.6 njabi
n Pu 9%
0.6
Pa
sta
s
Desserts
9%
0.6
ery
Bak
9%
0.6
se
ane
Leb %
0.69 n
Biryani Med
iterranea
0.69
%
Arab
ian
0.69%
American
Jain
6.9% 0.69%
Sweets
0.69%
Beverages
Pan-Asian
1.38%
Ice Cream
1.38%
Pizzas
Fast Food
Indian
1.38%
Salads
Andhra
6.21% 1.38%
Cafe Seafood
1.38%
rts Co
Thai
1.38 Italian
sse
ntin %
2.0 ental
De 52% 7% Mexican
5.
As
2 ian
M .07% Healthy Food
a n
u
2. ghla
4. eric
07
4%
% i Snacks
5% s
He 2.0
Sn .07% d
Am
3.4 rage
1
ac
2
lth
ks
Mughlai
yF
ve
Me 7%
7%
Seafood
as
oo
Andhra
2.0
%
3.45%
Be
Italia
xic
3.45%
2.76
Asian
Pizz
an
3.45
n
%
Continental
Conclusion:
From the above Visualizations, We can say, In Koramangala Area, "Chinese" Cuisines are dominated by around '10.3%' followed by "North Indian" &
"South Indian" Cuisines '9.66%' & '7.59%' Restaurants respectively.
So, We can also infer that Most of the people are fond of the "Chinese" Cuisines.
Out[82]:
Shop_Name Cuisine Location Rating Cost_for_Two (₹)
1 Mumbai Tiffin North Indian, Home Food, Thalis, Combo Sector 5, HSR 4.4 400
2 Sri Krishna sagar South Indian, North Indian, Fast Food, Beverag... 6th Block, Koramangala 4.1 126
3 Al Daaz American, Arabian, Chinese, Desserts, Fast Foo... HSR, HSR 4.4 400
113 Wok Paper Scissors Pan-Asian, Chinese, Asian JNC Road, Koramangala 3.9 219
114 Savoury Restaurant Arabian, Middle Eastern, North Indian, Grill, ... Madiwala, BTM 4.1 600
115 Royal Treat North Indian, Chinese, Seafood, Biryani 5th block Koramangala, Koramangala 4.2 193
117 Mani's Dum Biryani Andhra, Biryani 1st Block, Koramangala 4.2 400
In [83]: df_Swiggy['Cuisine']
Out[83]: 0 Sweets
1 North Indian, Home Food, Thalis, Combo
2 South Indian, North Indian, Fast Food, Beverag...
3 American, Arabian, Chinese, Desserts, Fast Foo...
4 Chinese, Thai
...
113 Pan-Asian, Chinese, Asian
114 Arabian, Middle Eastern, North Indian, Grill, ...
115 North Indian, Chinese, Seafood, Biryani
116 North Indian
117 Andhra, Biryani
Name: Cuisine, Length: 118, dtype: object
Out[84]: 'Sweets, North Indian, Home Food, Thalis, Combo, South Indian, North Indian, Fast Food, Beverages, Jain, American, Ar
abian, Chinese, Desserts, Fast Food, Mughlai, North Indian, Chinese, Thai, North Indian, Fast Food, North Indian, Chi
nese, Italian, South Indian, Kerala, Chinese, North Indian, Pizzas, Italian, Mexican, Chinese, South Indian, North In
dian, Desserts, Fast Food, Kerala, Andhra, Beverages, Mughlai, Seafood, Desserts, Chinese, Andhra, Biryani, Seafood,
Chinese, South Indian, Chinese, Desserts, North Indian, Arabian, Fast Food, Desserts, Beverages, North Indian, North
Indian, Indian, Rajasthani, Desserts, Bakery, Chinese, Healthy Food, North Indian, North Indian, Chinese, Hyderabadi,
Fast Food, Chinese, Jain, North Indian, South Indian, Indian, North Indian, South Indian, Chinese, Andhra, Biryani, C
hinese, Desserts, Fast Food, Seafood, South Indian, American, Fast Food, Biryani, Seafood, North Indian, Chinese, Des
serts, Andhra, South Indian, Snacks, American, North Indian, South Indian, Kerala, South Indian, Mexican, North India
n, Chinese, Biryani, North Indian, Chinese, Biryani, North Indian, Chinese, Biryani, North Indian, Turkish, Portugues
e, American, Biryani, Desserts, South Indian, Snacks, North Indian, Chinese, Desserts, Desserts, Fast Food, Sweets, C
haat, Chinese, South Indian, Andhra, Hyderabadi, Pizzas, Fast Food, Biryani, Mughlai, South Indian, Chinese, Asian, N
orth Indian, Chinese, South Indian, Italian, Desserts, Pizzas, Biryani, Andhra, South Indian, Chinese, Continental, I
talian, Mediterranean, Thai, Lebanese, American, Asian, Beverages, Bakery, Biryani, Cafe, Desserts, Healthy Food, Mex
ican, North Indian, Salads, Pizzas, Biryani, Pizzas, Chinese, Pastas, Salads, American, Continental, North Indian, Am
erican, Fast Food, South Indian, Andhra, Biryani, Chinese, South Indian, North Indian, Fast Food, Fast Food, Beverage
s, Desserts, Bakery, Biryani, South Indian, North Indian, Fast Food, Andhra, Beverages, Mughlai, Seafood, Punjabi, Hy
derabadi, Chinese, Biryani, Chinese, Beverages, Chinese, North Indian, South Indian, Biryani, Kerala, North Indian, C
hinese, Kerala, Chinese, North Indian, Chinese, Arabian, Beverages, Biryani, Chinese, Desserts, North Indian, Biryan
i, Juices, Kebabs, Andhra, South Indian, North Indian, American, Fast Food, Beverages, Cafe, Snacks, North Indian, So
uth Indian, Turkish, Portuguese, American, Grill, Home Food, Healthy Food, Indian, Andhra, Biryani, Chinese, Dessert
s, Fast Food, Seafood, South Indian, Chinese, Thai, Chinese, Ice Cream, Chinese, Hyderabadi, Biryani, Indian, South I
ndian, Andhra, Tandoor, Punjabi, North Indian, Chinese, Fast Food, Healthy Food, Mughlai, Desserts, American, North I
ndian, Biryani, Hyderabadi, Andhra, North Indian, South Indian, Chinese, Fast Food, Juices, North Indian, North India
n, Chaat, Snacks, Fast Food, Desserts, Indian, Desserts, Mughlai, Seafood, Ice Cream, Desserts, Ice Cream, Desserts,
Fast Food, Italian, Biryani, North Indian, North Indian, Snacks, American, Desserts, South Indian, Chinese, North Ind
ian, Biryani, Kebabs, Andhra, Chettinad, Chinese, Mughlai, North Indian, Chettinad, South Indian, Continental, India
n, Pan-Asian, Oriental, North Indian, South Indian, North Indian, Biryani, North Indian, South Indian, Andhra, Biryan
i, Pan-Asian, Chinese, Asian, Arabian, Middle Eastern, North Indian, Grill, Seafood, Kerala, Chinese, North Indian, C
hinese, Seafood, Biryani, North Indian, Andhra, Biryani'
Out[87]: {'a',
'about',
'above',
'after',
'again',
'against',
'ain',
'all',
'am',
'an',
'and',
'any',
'are',
'aren',
"aren't",
'as',
'at',
'be',
'because',
'been',
'before',
'being',
'below',
'between',
'both',
'but',
'by',
'can',
'couldn',
"couldn't",
'd',
'did',
'didn',
"didn't",
'do',
'does',
'doesn',
"doesn't",
'doing',
'don',
"don't",
'down',
'during',
'each',
'few',
'for',
'from',
'further',
'had',
'hadn',
"hadn't",
'has',
'hasn',
"hasn't",
'have',
'haven',
"haven't",
'having',
'he',
'her',
'here',
'hers',
'herself',
'him',
'himself',
'his',
'how',
'i',
'if',
'in',
'into',
'is',
'isn',
"isn't",
'it',
"it's",
'its',
'itself',
'just',
'll',
'm',
'ma',
'me',
'mightn',
"mightn't",
'more',
'most',
'mustn',
"mustn't",
'my',
'myself',
'needn',
"needn't",
'no',
'nor',
'not',
'now',
'o',
'of',
'off',
'on',
'once',
'only',
'or',
'other',
'our',
'ours',
'ourselves',
'out',
'over',
'own',
're',
's',
'same',
'shan',
"shan't",
'she',
"she's",
'should',
"should've",
'shouldn',
"shouldn't",
'so',
'some',
'such',
't',
'than',
'that',
"that'll",
'the',
'their',
'theirs',
'them',
'themselves',
'then',
'there',
'these',
'they',
'this',
'those',
'through',
'to',
'too',
'under',
'until',
'up',
've',
'very',
'was',
'wasn',
"wasn't",
'we',
'were',
'weren',
"weren't",
'what',
'when',
'where',
'which',
'while',
'who',
'whom',
'why',
'will',
'with',
'won',
"won't",
'wouldn',
"wouldn't",
'y',
'you',
"you'd",
"you'll",
"you're",
"you've",
'your',
'yours',
'yourself',
'yourselves'}
In [89]: wordcloud = WordCloud(width = 1000, height = 500, stopwords = stopwords_ENG, background_color = 'white').generate(df
_Swiggy_Text)
plt.figure(figsize = (22, 7))
plt.imshow(wordcloud)
plt.axis('off')
plt.show()
In [ ]:
In [ ]: