In this project I am to provide an example of advanced data preparation and optimization for the next stages of data visualization and data analysis.
I have selected a dataset of zomato reviews from kaggle. There are signnificant errors in this dataset and I will thoroughly filter this dataset so that we will be able to get insights down the track.
In retrospect I may have chosen a different dataset than this one since all of the restaurants here are from rural India and I am not very familiar with Indian geography. By the time I realised this I decided to just keep going with what I had so far.
#importing dataset and required libraries
import pandas as pd
from geopy.geocoders import Nominatim
import time
df = pd.read_csv('zomato.csv')
df.info()
<class 'pandas.core.frame.DataFrame'> RangeIndex: 56252 entries, 0 to 56251 Data columns (total 13 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 address 56235 non-null object 1 name 56236 non-null object 2 online_order 56233 non-null object 3 book_table 56194 non-null object 4 rate 48414 non-null object 5 votes 56174 non-null object 6 phone 54956 non-null object 7 location 56126 non-null object 8 rest_type 55914 non-null object 9 dish_liked 28027 non-null object 10 cuisines 56049 non-null object 11 approx_cost(for two people) 55731 non-null object 12 listed_in(type) 51642 non-null object dtypes: object(13) memory usage: 5.6+ MB
The rating and amount of votes, for example, should be a number.
df.sample(10, random_state = 12345)
address | name | online_order | book_table | rate | votes | phone | location | rest_type | dish_liked | cuisines | approx_cost(for two people) | listed_in(type) | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
32138 | 458, 2nd Main Road, Mico Layout, Stage 1, BTM,... | Bun Town | Yes | No | 4.0 /5 | 205 | 080 26686499 | BTM | Cafe, Bakery | Tea, Chocolate Muffin, Veg Burger, Coffee, Bur... | Cafe, Bakery | 500 | Delivery |
46258 | 3, Near HDFC Bank, CMH Road, Indiranagar, Bang... | Raaga | Yes | Yes | 3.8 /5 | 299 | 080 25250235\n+91 9341217011 | Indiranagar | Casual Dining | Panner Tikka, Chicken Biryani, Thali, Gajar Ka... | North Indian, Chinese, Continental | 1,200 | Delivery |
8514 | Behind Indian Oil Petrol Pump, SAP Labs, Graph... | Kerala Restaurant | Yes | No | 3.4/5 | 66 | 080 65999905\r\n+91 7259755030 | Whitefield | Quick Bites | NaN | Kerala, Biryani | 450 | Dine-out |
24199 | 118,13th Main, 29th Cross, 4th Block, Jayanaga... | Davangere Benna Dose Hotel | Yes | No | 4.1/5 | 90 | +91 7259699320 | Jayanagar | Quick Bites | Benne Dosa, Idli, Coffee | South Indian | 100 | Delivery |
36321 | 897, 1, Venkat Reddy Layout, National Games Vi... | Mayura Grand Pure Veg Restaurant | No | No | NEW | 0 | +91 7259368218 | Koramangala 6th Block | Casual Dining | NaN | North Indian, South Indian, Chinese | 600 | Dine-out |
54044 | 4, 60/1, Doddakannelli, Opposite Wipro Corpora... | Tarbouche | Yes | No | 3.5 /5 | 22 | +91 6364019616 | Sarjapur Road | Kiosk | NaN | Turkish | 300 | Dine-out |
7144 | 103, MG Road, Bangalore | White Plate | No | Yes | 4.2/5 | 258 | +91 8277182209\r\n+91 9880223322 | MG Road | Casual Dining, Bar | Cocktails, Tom Yum Soup, Lobster Bisque, Lobst... | Thai, Continental, North Indian | 1,500 | NaN |
25522 | 101, GLR Complex, Chelekere Outer Ring Road, K... | Matru Sagar | Yes | No | 4.1/5 | 327 | +91 9535442620 | Kalyan Nagar | Quick Bites | Vada, Butter Masala Dosa, Coffee | South Indian, North Indian, Chinese | 300 | Delivery |
22492 | 774, 33rd Cross, 10th Main, 4th Block, Jayanag... | La Casa | No | Yes | 3.6 /5 | 571 | +91 7760061447\r\n080 22454613 | Jayanagar | Casual Dining | Beer, Pasta, Burgers, Biryani, Masala Peanuts,... | Continental, Italian, Chinese, North Indian | 800 | Dine-out |
14258 | ('Rated 4.0' | 'RATED\n This is now my go to place at any d... | but I like it anyways :D') | ('Rated 3.0' | ""RATED\n The rooftop | which has a great ambiance | music and view | can be visited on any breezy evening with pal... | thanks to Bangalore's amazing weather. The se... | however was quite disappointing. Few waiters ... | unresponsive and dormant so much so that it w... | New place in EC....looking forward to more vi... | ('Rated 4.0' |
As seen above in the last row, there are entries that are input completely wrong. These will cause significant issues if they are not dealt with now. I will remove these rows and see if this will affect the dataset on a larger scale.
#function that removes a row if the 'votes' column cannot be converted to an int.
for x in df.index:
try:
is_int = int(df.loc[x, "votes"])
except:
df.drop(x, inplace = True)
Another problem seen in the dataset is that the rating value is not consistently a number - some titled 'new' and also there are a rather sizeable amount of missing values. I will drop the missing values and only keep the rating that can be expressed as a number since I beleive the customer rating is a KPI.
#Dropping missing values
df.dropna(subset = ['rate'],inplace = True)
#only keeping ratings with numbers
pattern = "^\d"
filter = df['rate'].str.contains(pattern)
filter.sum()
41665
df = df[filter]
df.head()
address | name | online_order | book_table | rate | votes | phone | location | rest_type | dish_liked | cuisines | approx_cost(for two people) | listed_in(type) | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 942, 21st Main Road, 2nd Stage, Banashankari, ... | Jalsa | Yes | Yes | 4.1/5 | 775 | 080 42297555\r\n+91 9743772233 | Banashankari | Casual Dining | Pasta, Lunch Buffet, Masala Papad, Paneer Laja... | North Indian, Mughlai, Chinese | 800 | Buffet |
1 | 2nd Floor, 80 Feet Road, Near Big Bazaar, 6th ... | Spice Elephant | Yes | No | 4.1/5 | 787 | 080 41714161 | Banashankari | Casual Dining | Momos, Lunch Buffet, Chocolate Nirvana, Thai G... | Chinese, North Indian, Thai | 800 | Buffet |
2 | 1112, Next to KIMS Medical College, 17th Cross... | San Churro Cafe | Yes | No | 3.8/5 | 918 | +91 9663487993 | Banashankari | Cafe, Casual Dining | Churros, Cannelloni, Minestrone Soup, Hot Choc... | Cafe, Mexican, Italian | 800 | Buffet |
3 | 1st Floor, Annakuteera, 3rd Stage, Banashankar... | Addhuri Udupi Bhojana | No | No | 3.7/5 | 88 | +91 9620009302 | Banashankari | Quick Bites | Masala Dosa | South Indian, North Indian | 300 | Buffet |
4 | 10, 3rd Floor, Lakshmi Associates, Gandhi Baza... | Grand Village | No | No | 3.8/5 | 166 | +91 8026612447\r\n+91 9901210005 | Basavanagudi | Casual Dining | Panipuri, Gol Gappe | North Indian, Rajasthani | 600 | Buffet |
Ok, now there are ONLY values that are expressed as <digit>.<digit>/<digit>
I will now turn these all into a floating point value so they can be used properly at a later time.
df['rate'] = df['rate'].str.replace(r'\/5', '', regex=True).astype(float)
df.head()
address | name | online_order | book_table | rate | votes | phone | location | rest_type | dish_liked | cuisines | approx_cost(for two people) | listed_in(type) | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 942, 21st Main Road, 2nd Stage, Banashankari, ... | Jalsa | Yes | Yes | 4.1 | 775 | 080 42297555\r\n+91 9743772233 | Banashankari | Casual Dining | Pasta, Lunch Buffet, Masala Papad, Paneer Laja... | North Indian, Mughlai, Chinese | 800 | Buffet |
1 | 2nd Floor, 80 Feet Road, Near Big Bazaar, 6th ... | Spice Elephant | Yes | No | 4.1 | 787 | 080 41714161 | Banashankari | Casual Dining | Momos, Lunch Buffet, Chocolate Nirvana, Thai G... | Chinese, North Indian, Thai | 800 | Buffet |
2 | 1112, Next to KIMS Medical College, 17th Cross... | San Churro Cafe | Yes | No | 3.8 | 918 | +91 9663487993 | Banashankari | Cafe, Casual Dining | Churros, Cannelloni, Minestrone Soup, Hot Choc... | Cafe, Mexican, Italian | 800 | Buffet |
3 | 1st Floor, Annakuteera, 3rd Stage, Banashankar... | Addhuri Udupi Bhojana | No | No | 3.7 | 88 | +91 9620009302 | Banashankari | Quick Bites | Masala Dosa | South Indian, North Indian | 300 | Buffet |
4 | 10, 3rd Floor, Lakshmi Associates, Gandhi Baza... | Grand Village | No | No | 3.8 | 166 | +91 8026612447\r\n+91 9901210005 | Basavanagudi | Casual Dining | Panipuri, Gol Gappe | North Indian, Rajasthani | 600 | Buffet |
Looking good! Now I will look at other missing values and potentially un-important data.
df.info()
<class 'pandas.core.frame.DataFrame'> Int64Index: 41665 entries, 0 to 56251 Data columns (total 13 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 address 41665 non-null object 1 name 41665 non-null object 2 online_order 41665 non-null object 3 book_table 41665 non-null object 4 rate 41665 non-null float64 5 votes 41665 non-null object 6 phone 40851 non-null object 7 location 41665 non-null object 8 rest_type 41516 non-null object 9 dish_liked 23462 non-null object 10 cuisines 41654 non-null object 11 approx_cost(for two people) 41418 non-null object 12 listed_in(type) 37319 non-null object dtypes: float64(1), object(12) memory usage: 4.5+ MB
# none of these columns are that useful. Could keep if needed.
df = df.drop(['book_table','phone','listed_in(type)'],axis = 1)
df['address'].isna().sum()
0
df.info()
<class 'pandas.core.frame.DataFrame'> Int64Index: 41665 entries, 0 to 56251 Data columns (total 10 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 address 41665 non-null object 1 name 41665 non-null object 2 online_order 41665 non-null object 3 rate 41665 non-null float64 4 votes 41665 non-null object 5 location 41665 non-null object 6 rest_type 41516 non-null object 7 dish_liked 23462 non-null object 8 cuisines 41654 non-null object 9 approx_cost(for two people) 41418 non-null object dtypes: float64(1), object(9) memory usage: 3.5+ MB
#Important information, reviews that dont have this can be dropped.
df.dropna(subset = ['approx_cost(for two people)'], inplace = True)
df.info()
<class 'pandas.core.frame.DataFrame'> Int64Index: 41418 entries, 0 to 56251 Data columns (total 10 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 address 41418 non-null object 1 name 41418 non-null object 2 online_order 41418 non-null object 3 rate 41418 non-null float64 4 votes 41418 non-null object 5 location 41418 non-null object 6 rest_type 41271 non-null object 7 dish_liked 23327 non-null object 8 cuisines 41410 non-null object 9 approx_cost(for two people) 41418 non-null object dtypes: float64(1), object(9) memory usage: 3.5+ MB
Now that unimportant information is gone. I will focus on trying to get location data for all of the locations. Since geopy is rather restrictive on how many requests one can send (one per second) I simplified the data to the general location of the restaurant and got the data for these areas.
df['location'].value_counts().count()
92
df['location'].unique()
array(['Banashankari', 'Basavanagudi', 'Mysore Road', 'Jayanagar', 'Kumaraswamy Layout', 'Rajarajeshwari Nagar', 'Vijay Nagar', 'Uttarahalli', 'JP Nagar', 'South Bangalore', 'City Market', 'Bannerghatta Road', 'BTM', 'Kanakapura Road', 'Bommanahalli', 'Electronic City', 'Sarjapur Road', 'Wilson Garden', 'Shanti Nagar', 'Koramangala 5th Block', 'Richmond Road', 'HSR', 'Koramangala 7th Block', 'Bellandur', 'Marathahalli', 'Whitefield', 'East Bangalore', 'Old Airport Road', 'Indiranagar', 'Koramangala 1st Block', 'Frazer Town', 'MG Road', 'Brigade Road', 'Lavelle Road', 'Church Street', 'Ulsoor', 'Residency Road', 'Shivajinagar', 'Infantry Road', 'St. Marks Road', 'Cunningham Road', 'Race Course Road', 'Commercial Street', 'Vasanth Nagar', 'Domlur', 'Koramangala 8th Block', 'Ejipura', 'Jeevan Bhima Nagar', 'Old Madras Road', 'Seshadripuram', 'Kammanahalli', 'Koramangala 6th Block', 'Majestic', 'Langford Town', 'Central Bangalore', 'Brookefield', 'ITPL Main Road, Whitefield', 'Varthur Main Road, Whitefield', 'Koramangala 2nd Block', 'Koramangala 3rd Block', 'Koramangala 4th Block', 'Koramangala', 'Hosur Road', 'RT Nagar', 'Banaswadi', 'North Bangalore', 'Nagawara', 'Hennur', 'Kalyan Nagar', 'HBR Layout', 'Rammurthy Nagar', 'Thippasandra', 'CV Raman Nagar', 'Kaggadasapura', 'Kengeri', 'Sankey Road', 'Malleshwaram', 'Sanjay Nagar', 'Sadashiv Nagar', 'Basaveshwara Nagar', 'Rajajinagar', 'Yeshwantpur', 'New BEL Road', 'West Bangalore', 'Magadi Road', 'Yelahanka', 'Sahakara Nagar', 'Jalahalli', 'Hebbal', 'Nagarbhavi', 'Peenya', 'KR Puram'], dtype=object)
Below is the code I used to get the latitude and longitude of each town. Since it can only be executed at 1 request per second it takes quite a while to run. Also there is one town that throws an error which I had to manually work around. I think if the address values were not from rural India then this error wouldnt be thrown. Regardless, since I printed all the values as part of the debugging process I was able to use that text as a way to collect the data.
def latlong(row):
try:
loc = geolocator.geocode(row, timeout = None)
print(row, loc.latitude, loc.longitude)
time.sleep(1)
return loc.latitude, loc.longitude
except:
print('error')
return 0, 0
locations = pd.DataFrame()
locations['city'] = df['location'].unique()
geolocator = Nominatim(user_agent="Portfolio Project")
locations['city'].apply(latlong)
data = """Banashankari 15.8876779 75.7046777
Basavanagudi 12.9417261 77.5755021
Mysore_Road 12.9466619 77.5300896
Jayanagar 12.9292731 77.5824229
Kumaraswamy_Layout 12.9081487 77.5553179
Rajarajeshwari_Nagar 12.9274413 77.5155224
Vijay_Nagar 18.5384853 75.5569267
Uttarahalli 12.9055682 77.5455438
JP_Nagar 12.2655944 76.6465404
South_Bangalore 52.49148485 1.2372484335227272
City_Market 39.76880625 -86.15345077251979
Bannerghatta_Road 12.9521804 77.6041899
BTM 45.95485055 -112.49659530324134
Kanakapura_Road 12.5442176 77.4213833
Bommanahalli 12.9089453 77.6239038
Electronic_City 15.67509025 73.81083634836561
Sarjapur_Road 12.920441 77.6653284
Wilson_Garden 12.9489339 77.5968273
Shanti_Nagar 22.478459 88.3541291
Koramangala_5th_Block 12.9348429 77.6189768
Richmond_Road 40.575894 -74.1251342
HSR_18.1475 41.538889
Koramangala_7th_Block 12.9364846 77.6134783
Bellandur 12.93103185 77.6782471
Marathahalli 12.9552572 77.6984163
Whitefield 53.5533682 -2.2969019
East_Bangalore 50.84612745 0.50281715
Old_Airport_Road 34.0282305 74.7978062
Indiranagar 12.9732913 77.6404672
Koramangala_1st_Block 12.9277245 77.6327822
Frazer_Town 12.9986827 77.615525
MG_Road 12.9755264 77.6067902
Brigade_Road 12.9699876 77.6065344
Lavelle_Road 40.7652844 -76.373824
Church_Street 40.7131693 -74.0092922
Ulsoor 12.9778793 77.6246697
Residency_Road 34.0699187 74.8052392
Shivajinagar 18.532248199999998 73.84990967997429
Infantry_Road 12.9829856 77.5964564
St._Marks_Road 54.1339384 -4.6097098
Cunningham_Road 36.5348643 -79.0905056
Race_Course_Road 1.3147772 103.8567062
Commercial_Street 51.5184049 -0.0744581
Vasanth_Nagar 12.988721250000001 77.58516877601824
Domlur 12.9624669 77.6381958
Koramangala_8th_Block 12.9408685 77.617338
Ejipura 12.945245 77.6269144
Jeevan_Bhima_Nagar 12.9678074 77.6568367
Old_Madras_Road 13.0180639 77.7061087
Seshadripuram 12.9931876 77.5753419
Kammanahalli 13.0093455 77.6377094
Koramangala_6th_Block 12.9390255 77.6238477
Majestic 1.2847055 103.84320655721689
Langford_Town 12.957998 77.6037312
Central_Bangalore 13.0101286 77.5548006
Brookefield 33.5935063 -79.0345627
ITPL_Main_Road,_Whitefield 12.9804194 77.7275164
Varthur_Main_Road,_Whitefield 12.944569 77.7469486
Koramangala_2nd_Block 12.9243692 77.6242433
Koramangala-3rd_Block 12.9282918 77.6254034
Koramangala_4th_Block 12.9327778 77.6294052
Koramangala 12.9340114 77.6222304
Hosur_Road 12.7688298 77.7881932
RT_Nagar 13.0227204 77.595715
Banaswadi 13.0141618 77.6518539
North_Bangalore 12.9767936 77.590082
Nagawara 13.2227 78.5541977
Hennur 13.0258087 77.6305067
Kalyan_Nagar 13.0221416 77.6403368
HBR_Layout 13.0358698 77.6323597
Thippasandra 12.973936 77.6509982
CV_Raman_Nagar 17.2510682 80.1651978
Kaggadasapura 12.9846713 77.6790908
Kengeri 12.9176571 77.4837568
Sankey_Road 38.7801076 -121.5056438
Malleshwaram 13.0027353 77.5703253
Sanjay_Nagar 23.1485712 81.6048241
Sadashiv_Nagar 15.8782951 74.5084834
Basaveshwara_Nagar 12.2950874 76.6149845
Rajajinagar 12.9882338 77.554883
Yeshwantpur 13.02383 77.5529215
New_BEL_Road 13.0284758 77.5711758
West_Bangalore 12.9781739 77.5695603
Magadi_Road 12.9756527 77.5553548
Yelahanka 13.1006982 77.5963454
Sahakara_Nagar 18.4900796 73.8475301
Jalahalli 13.0464531 77.5483803
Hebbal 13.0382184 77.5919
Nagarbhavi 12.95212575 77.5113129189094
Peenya 13.0329419 77.5273253
KR_Puram 13.007516 77.695935"""
from io import StringIO
# Create a DataFrame
locs = pd.read_csv(StringIO(data), sep=" ", header=None)
locs.columns = ["city", "latitude", "longitude"]
# Display the DataFrame
locs
city | latitude | longitude | |
---|---|---|---|
0 | Banashankari | 15.887678 | 75.704678 |
1 | Basavanagudi | 12.941726 | 77.575502 |
2 | Mysore_Road | 12.946662 | 77.530090 |
3 | Jayanagar | 12.929273 | 77.582423 |
4 | Kumaraswamy_Layout | 12.908149 | 77.555318 |
... | ... | ... | ... |
86 | Jalahalli | 13.046453 | 77.548380 |
87 | Hebbal | 13.038218 | 77.591900 |
88 | Nagarbhavi | 12.952126 | 77.511313 |
89 | Peenya | 13.032942 | 77.527325 |
90 | KR_Puram | 13.007516 | 77.695935 |
91 rows × 3 columns
# geo data not available for this entry
pattern = 'Rammurthy Nagar'
filter2 = df['location'].str.contains(pattern)
df = df[~filter2]
df = df.merge(locs, left_on='location', right_on='city')
Now the latitude and longitude of the general location of the restaurants has been added to the dataframe. Next up is converting the average cost of dining from Indian Rupees to American Dollars.
df['usd_cost_for_two'] = round(df['approx_cost(for two people)'].str.replace(",","").astype(int)/82,1)
df = df.drop(['approx_cost(for two people)'],axis=1)
df.sample(50)
address | name | online_order | rate | votes | location | rest_type | dish_liked | cuisines | city | latitude | longitude | usd_cost_for_two | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2609 | 126, Near Ganesha Temple, 7th Main, 4th Block,... | The Grillo | Yes | 2.8 | 80 | Jayanagar | Casual Dining | NaN | North Indian, Mughlai, Chinese, South Indian, ... | Jayanagar | 12.929273 | 77.582423 | 8.5 |
5631 | 33, 9th A Main Road, KEB Colony, 1st Stage, BT... | Marunadan Kada | No | 3.3 | 6 | BTM | Quick Bites | NaN | Kerala, Tea | BTM | 45.954851 | -112.496595 | 3.0 |
7650 | 3, 6th Floor, Bangalore Central Mall, Bellandu... | Chaarcoal | Yes | 4.0 | 468 | Bellandur | Casual Dining | Egg Biryani, Raita, Gulab Jamun, Chicken Birya... | North Indian | Bellandur | 12.931032 | 77.678247 | 14.6 |
17634 | No 5, 1st cross, Rajaji Nagar 4th block, Banga... | Eater's Cart | Yes | 3.5 | 16 | Rajajinagar | Takeaway, Delivery | NaN | Chinese, Continental, North Indian, South Indian | Rajajinagar | 12.988234 | 77.554883 | 3.0 |
15784 | 12, 60 Feet Road, Vaikuntam Layout, Lakshminar... | Pita Pocket Factory | No | 3.6 | 27 | Brookefield | Casual Dining | NaN | Mediterranean, Continental, Italian, Burger | Brookefield | 33.593506 | -79.034563 | 6.1 |
1245 | 115, 4th Main, 4th Stage, Thyagarajanagar, Nea... | Amande Patisserie | Yes | 4.0 | 73 | Basavanagudi | Bakery | Macaroon, Mousse, Caramel Eclair | Bakery, French, Desserts | Basavanagudi | 12.941726 | 77.575502 | 3.7 |
16263 | 55, 5th Cross Road, 1st Block, Lakshmamma Layo... | Coffee@Arens | Yes | 3.8 | 77 | Banaswadi | Cafe | Filter Coffee, Cappuccino, Brewed Coffee | Cafe, Fast Food | Banaswadi | 13.014162 | 77.651854 | 6.7 |
16762 | 153, B.E.M.L. Road, Thippasandra, Bangalore | Night Booze | No | 3.2 | 8 | Thippasandra | Casual Dining, Bar | NaN | North Indian, Fast Food | Thippasandra | 12.973936 | 77.650998 | 7.3 |
6392 | Shop 9, Cashier Layout, 3rd Cross, Thavarekere... | Gelato Italiano | Yes | 3.8 | 32 | BTM | Food Court, Dessert Parlor | NaN | Ice Cream, Bakery, Desserts | BTM | 45.954851 | -112.496595 | 2.4 |
8620 | C.K.B Layout, Near Nest Backry, Munnekolala, M... | Mahek of Punjab | Yes | 2.7 | 75 | Marathahalli | Quick Bites | NaN | North Indian | Marathahalli | 12.955257 | 77.698416 | 4.9 |
9273 | Shop 7, 8 Opposite, Airtel Express, Panathur M... | Keerthi Restaurant Andhra Style | Yes | 3.3 | 8 | Marathahalli | Quick Bites | NaN | Andhra | Marathahalli | 12.955257 | 77.698416 | 3.7 |
6231 | 13, Near Christ College, Hosur Road | Sri Vishnupriya | No | 3.0 | 67 | BTM | Quick Bites | Masala Dosa, Plain Dosa | South Indian, North Indian, Chinese | BTM | 45.954851 | -112.496595 | 3.7 |
5104 | 3rd Cross, Maruthinagar Main Road, AGB Layout,... | Rolls On Wheels | No | 3.2 | 15 | BTM | Quick Bites | NaN | Fast Food, Rolls, Momos | BTM | 45.954851 | -112.496595 | 2.4 |
1437 | 23, 3rd Floor, 26th Main Road, Opposite Ragigu... | Willys Top Cafe | Yes | 4.0 | 308 | Jayanagar | Cafe | Coffee Shake, Pasta, Buffalo Wings, Sandwich, ... | Cafe, Continental, Asian | Jayanagar | 12.929273 | 77.582423 | 9.1 |
2277 | 173, Ground Floor, Byrasandra Main Road, 1st B... | Butter Cup | No | 3.5 | 9 | Jayanagar | Dessert Parlor | NaN | Desserts, Bakery | Jayanagar | 12.929273 | 77.582423 | 3.0 |
7892 | Kiosk 3, Campus 4A-B Food Court, RMZ Ecoworld,... | Drunken Monkey | Yes | 3.4 | 12 | Bellandur | Kiosk | NaN | Beverages, Fast Food | Bellandur | 12.931032 | 77.678247 | 6.1 |
7906 | Near Ganesh Temple, Bellandur, Bangalore | Laddoos | Yes | 2.9 | 166 | Bellandur | Quick Bites, Sweet Shop | Paratha, Samosa, Chole Bhature, Pav Bhaji, Kac... | North Indian, Street Food, Mithai | Bellandur | 12.931032 | 77.678247 | 3.0 |
11268 | 4032, 100 ft Road, HAL II stage Next to Domlur... | Mainland China | Yes | 4.4 | 1507 | Indiranagar | Casual Dining | Basil Chicken, Lunch Buffet, Chicken Tom Yum S... | Chinese, Momos | Indiranagar | 12.973291 | 77.640467 | 20.7 |
4947 | 36, 20th Main, 1st Stage, BTM, Bangalore | Pappu Chaiwalla | Yes | 3.1 | 89 | BTM | Quick Bites | Ginger Chai, Ginger Tea, Pakoda, Paratha, Magg... | North Indian, Momos, Rolls, Fast Food | BTM | 45.954851 | -112.496595 | 4.3 |
7556 | Sai Durga Enclave, Salarpuria Soft Zone, Besid... | Mango Tree Grand | Yes | 3.8 | 112 | Bellandur | Quick Bites | NaN | Andhra, North Indian | Bellandur | 12.931032 | 77.678247 | 8.5 |
18074 | 25, S.C Road, Near Jama Masjid, Bazar Street, ... | Paris Restaurant | Yes | 3.7 | 39 | Yeshwantpur | Casual Dining | NaN | North Indian, Chinese, Biryani | Yeshwantpur | 13.023830 | 77.552921 | 6.7 |
7135 | 18/1C, Near Trinity Meadows, Bellandur Main Ro... | Zayakedar | Yes | 4.0 | 250 | Bellandur | Quick Bites | Rajma, Fried Rice, Lassi, Butter Phulkas, Bhin... | North Indian | Bellandur | 12.931032 | 77.678247 | 3.0 |
7295 | 6021, Sobha Dahlia, Bellandur, Bangalore | Devi's Cakes N Bakes | No | 3.6 | 31 | Bellandur | Bakery | NaN | Bakery, Desserts | Bellandur | 12.931032 | 77.678247 | 2.4 |
13555 | Lemon Tree Premier, 2/1, St. Johns Road, Ulsoo... | Slounge - Lemon Tree Premier | No | 4.0 | 64 | Ulsoor | Lounge | Pool Table | Finger Food | Ulsoor | 12.977879 | 77.624670 | 18.3 |
12278 | 49/1, 14th A Cross, 2nd Stage, Indiranagar, Ba... | Pathy's Kitchen | Yes | 3.5 | 21 | Indiranagar | Quick Bites | NaN | Andhra | Indiranagar | 12.973291 | 77.640467 | 6.1 |
9571 | 120-A3, 3rd Road, Ground Floor, Santosh Tower,... | The Egg Factory | Yes | 4.0 | 738 | Whitefield | Casual Dining | French Toast, Pasta, Egg Pav Bhaji, Khau Suey,... | Continental, American | Whitefield | 53.553368 | -2.296902 | 9.1 |
4048 | 1/84, Ground Floor, Near Citi Bank | Invitation Bar & Restaurant | No | 3.0 | 15 | BTM | Bar | NaN | North Indian | BTM | 45.954851 | -112.496595 | 12.2 |
4081 | 240, 7th cross, 1st Main, Mico Layout, Opposit... | PHEW (Play Hard Eat Wild) | Yes | 3.9 | 488 | BTM | Cafe | Noodles, Shawarma, Brownie, Chicken Nachos, Ve... | Continental, Lebanese, Middle Eastern, North I... | BTM | 45.954851 | -112.496595 | 8.5 |
14073 | 97, 2nd Main, Royal Orchid Road, Amarjyoti Lay... | Allahabadi Tadaka | No | 2.9 | 46 | Domlur | Casual Dining | Dal Tadka | North Indian | Domlur | 12.962467 | 77.638196 | 3.0 |
12559 | 479, 1st Floor, 2nd Main, 2nd stage, Behind BD... | AhimsaAmrit Green Cafe | No | 3.7 | 19 | Indiranagar | Casual Dining | NaN | Healthy Food, Salad, Continental | Indiranagar | 12.973291 | 77.640467 | 9.8 |
17703 | Abhimaani Vasathi, 2/9, Dr Rajkumar Road, Raja... | Coastal Spice | Yes | 3.7 | 56 | Rajajinagar | Casual Dining | Sea Food | Seafood, North Indian, Chinese, Continental, M... | Rajajinagar | 12.988234 | 77.554883 | 11.0 |
14400 | 343, Ejipura Main Road, Viveknagar, Ejipura Ar... | Chung Shan Chinese Restaurant | No | 3.7 | 32 | Ejipura | Quick Bites | NaN | Chinese, Momos | Ejipura | 12.945245 | 77.626914 | 6.1 |
7060 | Pritech park, Lower Ground Floor, Food Court, ... | The Brewing Bean | No | 3.7 | 47 | Bellandur | Cafe | Coffee, Pasta, Fish | Cafe | Bellandur | 12.931032 | 77.678247 | 6.1 |
15300 | OTC Road, Near Corporation Circle, Majestic, B... | Cake of the Day | No | 3.5 | 19 | Majestic | Bakery, Dessert Parlor | NaN | Bakery | Majestic | 1.284706 | 103.843207 | 1.8 |
13128 | Opposite RBANMS Grounds, St John's Road, Ulsoo... | Sangam Kabab Corner | No | 3.1 | 4 | Ulsoor | Quick Bites | NaN | Fast Food, North Indian | Ulsoor | 12.977879 | 77.624670 | 3.7 |
1506 | 615/1, 10th C Main,32nd Cross Road ,Janardhan ... | Mystique Palate | Yes | 4.1 | 337 | Jayanagar | Quick Bites | Noodles, Pasta, Schezwan Momos, Chicken Momo, ... | Chinese, Fast Food | Jayanagar | 12.929273 | 77.582423 | 3.7 |
13828 | M.F Noranha Road, Opp. Russel Market, Shivajin... | Chaitanya Veg | Yes | 3.2 | 5 | Shivajinagar | Quick Bites | NaN | South Indian | Shivajinagar | 18.532248 | 73.849910 | 3.7 |
9483 | 3-A1, Kundanahalli Main Road, Mahadevpura, Opp... | Kava Kitchen & Bar - Fairfield by Marriott | No | 3.9 | 69 | Whitefield | Casual Dining, Bar | Dal Halwa | North Indian, South Indian, Continental, Ameri... | Whitefield | 53.553368 | -2.296902 | 14.6 |
1246 | 14/1 5 th Main 2nd Cross, Near BMS Hostel, Bas... | Chats Point | Yes | 3.4 | 8 | Basavanagudi | Quick Bites | NaN | Fast Food, Street Food | Basavanagudi | 12.941726 | 77.575502 | 1.8 |
8777 | 83, GP Plaza, Outer Ring Road,Near Kala Mandir... | Nizam's Biryani House | Yes | 3.9 | 772 | Marathahalli | Casual Dining | Hyderabadi Biryani, Tikka, Chicken Biryani, Ch... | North Indian, Biryani | Marathahalli | 12.955257 | 77.698416 | 12.2 |
3015 | 01, 100 Feet Ring Road, 1st Phase, 2nd Stage, ... | Polar Bear | Yes | 3.9 | 20 | BTM | Takeaway, Delivery | NaN | Desserts, Ice Cream | BTM | 45.954851 | -112.496595 | 3.7 |
5632 | 15, Near Christ College, 7th Cross, S.G Palya ... | Sreeraj Lassi Bar | Yes | 4.0 | 87 | BTM | Beverage Shop | Faluda, Fruit Salad, Fruit Lassi | Beverages | BTM | 45.954851 | -112.496595 | 2.4 |
7513 | Parijatha Avenue, Bellandur, Bangalore | Lassi Shop | Yes | 3.9 | 153 | Bellandur | Beverage Shop | NaN | Beverages, Ice Cream | Bellandur | 12.931032 | 77.678247 | 2.4 |
2704 | 40th Cross, 9th Main, Near BSNL Office, 5th Bl... | Mainland China | Yes | 4.3 | 885 | Jayanagar | Casual Dining | Tai Pai Chicken, Momos, Kimchi, Veg Hakka Nood... | Chinese, Momos | Jayanagar | 12.929273 | 77.582423 | 20.7 |
9682 | Broadway 95, Road 2, KIADB, EPIP Zone, Whitefi... | JLT Food | Yes | 3.6 | 23 | Whitefield | Quick Bites | NaN | North Indian | Whitefield | 53.553368 | -2.296902 | 5.5 |
18158 | Shop 12, 1st Cross, Sapthagiri Layout, Beside ... | Cheta's Kitchen | Yes | 3.9 | 78 | Yelahanka | Quick Bites | Appam, Fish Curry, Fish Fry, Pothichoru | Kerala, South Indian, Seafood | Yelahanka | 13.100698 | 77.596345 | 4.3 |
14648 | 2, Serpentine Road, Kumara Park West, Seshadri... | Chetty's Corner | Yes | 4.2 | 740 | Seshadripuram | Quick Bites | Burgers, Bun Nippat Masala, Masala Cola, Pizza... | Fast Food, Pizza, Sandwich | Seshadripuram | 12.993188 | 77.575342 | 3.0 |
6786 | 1A/3, GR Residency, 14th Cross, 20th Main, Ven... | HungerLoft | Yes | 2.5 | 109 | BTM | Casual Dining | NaN | North Indian, Chinese, Arabian | BTM | 45.954851 | -112.496595 | 9.8 |
5601 | 12/13, 20th Main, Maruthinagar, 1st Stage | Neer Dosa Fish Land | No | 3.6 | 39 | BTM | Casual Dining | NaN | Seafood, Mangalorean | BTM | 45.954851 | -112.496595 | 7.3 |
2135 | 774, 33rd Cross, 10th Main, 4th Block, Jayanag... | La Casa | No | 3.6 | 570 | Jayanagar | Casual Dining | Beer, Pasta, Burgers, Biryani, Masala Peanuts,... | Continental, Italian, Chinese, North Indian | Jayanagar | 12.929273 | 77.582423 | 9.8 |
Now we have a cleaned dataset ready for analysis and visualization.
df.to_csv('zomato_clean.csv')