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

_data = pd.read_csv('../input/zomato.csv')

data = _data.drop(columns=['url', 'address', 'phone'], axis=1)
columns = data.columns

splist = []
cuisine = []
for i in range(0, data['cuisines'].count()):
    splist = str(data['cuisines'][i]).split(', ')
    for item in splist:
        if item not in cuisine:
            cuisine.append(item)
cuisine

cuisineCount = pd.DataFrame(columns=['cuisines', 'count'])
i = 0
for c in cuisine:
    restaurant = data['cuisines'].str.contains(c, case=False, regex=True, na=False)
    cuisineCount.loc[i] = [c, restaurant[restaurant == True].count()]
    i = i + 1
cuisineCount.sort_values(by='count', axis=0, ascending=False, inplace=True)
print('The top 10 cuisines sold in bangalore:\n{}'.format(cuisineCount.head(25)))