PythonpandasseabornSciPyData cleaningEDA

What drives a restaurant's rating?

Cleaning and exploring 9,551 Zomato restaurants across 15 countries: from a messy raw file to statistically tested findings.

9,551restaurants
15countries
141cities
145cuisines
78%have a rating
3.44mean rating

Key takeaways

Four things to know before the charts.

Rating follows popularity and price

Votes (ρ = 0.68) and price tier (3.24 → 3.89) track rating far more than any service feature.

Table booking is a proxy for price

The +0.24 rating gap in India reverses inside the upscale tiers.

Data quality changed the story

Treating 2,148 "0" ratings as missing lifts the mean from 2.67 to 3.44.

Sample bias limits comparisons

India is 91% of rows, so city and country rankings compare samples, not markets.

Data cleaning

Nothing was deleted: impossible values became missing, and every change is logged in the notebook.

IssueFoundFix
Encoding damage (�) in names, cities, addresses428 cells84% restored (Café, São Paulo, İstanbul); rest stripped
"Not rated" stored as rating 02,148 rows (22.5%)Set to blank + is_rated flag. Mean rating 2.67 → 3.44
Cost in 12 currenciesevery rowCountry-based currency + approximate USD columns
Wrong currency label (Philippines = "Botswana Pula")22 rowsCorrected
Average cost = 018 rowsSet to blank
Coordinates = 0 or outside the country500 rowsSet to blank + coords_valid flag
Missing cuisines9 rowsFilled with "Unknown"
Constant / redundant columns3 columnsDropped. No duplicate restaurants found, no rows deleted

Findings

Rating analyses use rated restaurants only; service comparisons use India only.

01

The data is a Delhi story

India is 90.6% of all restaurants and Delhi NCR alone is 83%. Outside NCR the file holds only about 20 restaurants per city.

The data is a Delhi story
02

Ratings are bell-shaped, centred near 3.4

Mean 3.44. Only 301 restaurants are "Excellent" (4.5+). 22.5% have no rating at all (cleaned from a hidden 0).

Ratings are bell-shaped, centred near 3.4
03

More votes, higher ratings

Spearman ρ = 0.68. Mean rating rises from 2.98 (≤10 votes) to 4.20 (1,000+ votes). 32% of restaurants have under 10 votes, so many ratings are noisy.

More votes, higher ratings
04

Pricier restaurants rate higher

Mean rating climbs from 3.24 (budget) to 3.89 (fine dining), Kruskal-Wallis p < 0.001. In India, cost per person vs rating: ρ = 0.33.

Pricier restaurants rate higher
05

Table booking's "rating boost" is mostly a price effect

In India, booking restaurants average 3.55 vs 3.31, but inside the Upscale and Fine-dining tiers they rate lower (3.59 vs 3.79, 3.62 vs 3.94). Online delivery shows no consistent effect (3.37 vs 3.34).

Table booking's
06

Which cuisines win in India

Mediterranean (3.98), European (3.91) and Asian (3.85) rate highest; Mithai (3.14) and Raw Meats (3.07) lowest. North Indian is the most common primary cuisine (2,992).

Which cuisines win in India
07

Wider menus, slightly higher ratings

Mean rating goes from 3.40 (one cuisine) to 3.66 (five or more), but the correlation is weak (ρ ≈ 0.12) and cost rises alongside.

Wider menus, slightly higher ratings
08

Cities and localities

Ghaziabad, Faridabad (3.10) and Noida (3.16) rate lowest; London (4.54) and Rio (4.49) highest, though on ~20 restaurants each. Connaught Place is the busiest locality (122 restaurants, avg 3.78).

Cities and localities
09

Countries are not comparable like-for-like

India averages 3.35 versus 3.6–4.5 elsewhere, but foreign samples are small and 99–100% rated, so this is not a quality ranking. Online delivery exists only for India (28%) and the UAE (47%).

Countries are not comparable like-for-like
10

Delhi NCR: dense, with mixed quality

Grey dots are unrated restaurants. Coordinates were validated against country bounds; 500 unusable points were excluded.

Delhi NCR: dense, with mixed quality
11

What moves with rating

Votes 0.68, cost per person 0.45, price range 0.40, table booking 0.13, cuisines 0.12, online delivery −0.04 (Spearman, rated restaurants).

What moves with rating
12

Big chains rate below average

Domino's 2.93, Cafe Coffee Day 3.00 and Subway 3.00 sit well under the 3.44 mean; Starbucks (3.81) and Barbeque Nation (4.35) stand out.

Big chains rate below average

Recommendations

Show vote counts next to ratings

32% of restaurants have fewer than 10 votes, and rating rises with votes. A rating from 5 votes should be labelled provisional.

Fix the data capture

Store "not rated" as missing, not 0, fix the currency labels and text encoding, and validate coordinates at entry.

Next: model and deep-dive

Predict rating from cost, votes, cuisines, services and location, and analyse Delhi NCR localities, the only area with enough data.

Method & caveats

Methods: Spearman correlation, Kruskal-Wallis and Mann-Whitney tests (ratings are not normally distributed), stratified comparisons by price tier to control for confounding.

Caveats: USD costs use fixed, approximate 2018 exchange rates. About 70 damaged text cells could not be restored. The sample is not random, so results are associations, not causes.