In [5]:
from yummly import Client
import json
import requests
import pandas as pd
import numpy as np 
import re # need to import regex

In [6]:
# API call for the first 500 BB recipes labeled as such only!
header= {'X-Yummly-App-ID':'79663a75', 'X-Yummly-App-Key':'02b233108f476f3110e0f65437c4d6dd'}
url='http://api.yummly.com/v1/api/recipes?'
parameters={
            'allowedCourse[]':'course^course-Breakfast and Brunch',
            'excludedCourse[]': ['course^course-Main Dishes','course^course-Appetizers', 'course^course-Salads', 'course^course-Lunch',
                                'course^course-Side Dishes','course^course-Desserts','course^course-Breads',
                                 'course^course-Soups', 'course^course-Beverages', 'course^course-Condiments and Sauces',
                                'course^course-Cocktails', 'course^course-Snacks'],
            'maxResult': 501,
            'start': 499
            }

response=requests.get(url, headers = header, params = parameters)

In [7]:
response.status_code


Out[7]:
200

In [8]:
BB=response.json()

print type(BB)
print BB.keys()


<type 'dict'>
[u'matches', u'totalMatchCount', u'attribution', u'facetCounts', u'criteria']

In [9]:
#only interrested in the information under matches. 
print len(BB['matches'])
print type(BB['matches'])
print BB['matches'][0].keys()


500
<type 'list'>
[u'flavors', u'rating', u'totalTimeInSeconds', u'ingredients', u'smallImageUrls', u'sourceDisplayName', u'recipeName', u'attributes', u'id', u'imageUrlsBySize']

In [11]:
#checkout one recipe
BB_matches=BB['matches']
BB_matches[0]


Out[11]:
{u'attributes': {u'course': [u'Breakfast and Brunch']},
 u'flavors': {u'bitter': 0.6666666666666666,
  u'meaty': 0.3333333333333333,
  u'piquant': 0.0,
  u'salty': 0.8333333333333334,
  u'sour': 0.16666666666666666,
  u'sweet': 0.16666666666666666},
 u'id': u'Baked-French-Toast-Casserole-1636754',
 u'imageUrlsBySize': {u'90': u'https://lh3.googleusercontent.com/pSQ8-zmDr_c5asdCRjpX_9wCp5TWzzsKu25wNyJHeJNezAGS8_0xqxOmVaD1k2iH8RPYrbjFxqRQ3kPh6N7O=s90-c'},
 u'ingredients': [u'french bread',
  u'eggs',
  u'milk',
  u'vanilla',
  u'salt',
  u'unsalted butter'],
 u'rating': 4,
 u'recipeName': u'Baked French Toast Casserole',
 u'smallImageUrls': [u'https://lh3.googleusercontent.com/mUYnOpHQhuIZFNCXgvgbPp0LU9phviIqIHa3FEHgVR8HIea86HsQiXxlKln5arT_ppDpPOXIzNDdo1n-qS11=s90'],
 u'sourceDisplayName': u'Life Currents',
 u'totalTimeInSeconds': 3600}

In [12]:
#import previous list of recipes collected
df=pd.read_csv('BB_main.csv')
BB_ids=df.id
print BB_ids[0]
BB1_ids=[]
for recipe in BB_matches:
    BB1_ids.append(recipe['id'])
print BB1_ids[0]
#check if there are dupplicate recipes
[i for i, j in zip(BB_ids, BB1_ids) if i == j]


Healthy-Chocolate-Porridge-1711204
Baked-French-Toast-Casserole-1636754
Out[12]:
[]

In [70]:
#forming lists to create dataframes of the features we want. 
main_list = []
ingredients_list = []
attributes_list = []


for food in BB_matches:

    _d1 = {}
    _d1['id'] = food['id']
    _d1['rating'] = food['rating']
    _d1['recipeName'] = food['recipeName']
    _d1['sourceDisplayName'] = food['sourceDisplayName']
    
    main_list.append(_d1)
    
    _d2 = {}
    _d2['id'] =food['id']
    _d2['course'] = 'Breakfast and Brunch' 

    for i in food['ingredients']:
        i = i.lower() # additional code to conver to lowercase
        i = re.sub(r'\d+%\s', '', i) # additional code to remove 1%, 2%, etc
        i = re.sub(r'\xae', '', i) # remove '\xae' characters
        _d2[i] = 1
    ingredients_list.append(_d2)

    _d3 = {}
    _d3['id'] = food['id']
    for k, v in food['attributes'].items():
        for i in v:
            _d3[i] = 1
    attributes_list.append(_d3)

flavors_dict = {}

for food in BB_matches:
    flavors_dict[food.get('id')] = food.get('flavors')

In [66]:
# read in dictionary for course and cuisine and create list of possible values for each
cuisine_df = pd.read_csv('cuisine_headers.csv', names=['cuisine'])
cuisine_list= cuisine_df.cuisine

In [67]:
#create dictionary of cuisine and course for each recipe
cuisine_dict={}
for food in BB_matches:
    cuisine_dict[food.get('id')]= food['attributes'].get('cuisine')
        
_cuisines= {}       

for k, v in cuisine_dict.iteritems():
    cuisine_val = {}
    for course in cuisine_list:
        try:
            if course in v :
                cuisine_val[course] = 1
            else:
                cuisine_val[course] = 0
        except TypeError:
            cuisine_val[course] = 0
    
        _cuisines[k] = cuisine_val

In [68]:
# second api call to get other features for each recipe
key_id= '_app_id=79663a75&_app_key=02b233108f476f3110e0f65437c4d6dd'
url='http://api.yummly.com/v1/api/recipe/'

In [69]:
# retrieve other features for all recipes

def get_recipe(_id):
    response = requests.get(url + _id + '?' + key_id)
    return response.json()

recipes=[]
for _id in BB1_ids :
    recipes.append(get_recipe(_id))

In [19]:
response.status_code


Out[19]:
200

In [20]:
print len(recipes)
print recipes[1].keys()


500
[u'totalTime', u'ingredientLines', u'attribution', u'name', u'prepTimeInSeconds', u'rating', u'cookTimeInSeconds', u'numberOfServings', u'yield', u'nutritionEstimates', u'source', u'flavors', u'images', u'attributes', u'cookTime', u'id', u'prepTime', u'totalTimeInSeconds']

In [21]:
#for each recipe create a new dictionary of selected attributes and append into a list

recipe_details=[]
for recipe in recipes:
    _dict={}
    #import pdb; pdb.set_trace()
    _dict['id']=recipe['id']
    _dict['ingredientCount']= len(recipe['ingredientLines'])
    _dict['numberOfServings']= recipe['numberOfServings']
    if 'prepTimeInSeconds' in recipe.keys():
        _dict['prepTimeInSeconds']= recipe['prepTimeInSeconds']
    else:
        _dict['prepTimeInSeconds']= None
    if 'cookTimeInSeconds' in recipe.keys():
        _dict['cookTimeInSeconds']= recipe['cookTimeInSeconds']
    else:
        _dict['cookTimeInSeconds']= None
    _dict['totalTimeInSeconds']=recipe['totalTimeInSeconds']
    
    
    recipe_details.append(_dict)

In [71]:
#create dataframes, arrange column index and save into csv
df_main = pd.DataFrame(main_list)
df_main.to_csv('BB_main_1.csv', encoding ='utf-8')

df_ingredients = pd.DataFrame(ingredients_list)
df_ingredients = df_ingredients.fillna(0)
cols = list(df_ingredients)
cols.insert(0, cols.pop(cols.index('id')))
cols.insert(1, cols.pop(cols.index('course')))
df_ingredients= df_ingredients.ix[:,cols]
df_ingredients.to_csv('BB_ingredients_1.csv', encoding ='utf-8')

df_attributes = pd.DataFrame(attributes_list)
df_attributes = df_attributes.fillna(0)
cols = list(df_attributes)
cols.insert(0, cols.pop(cols.index('id')))
df_attributes = df_attributes.ix[:,cols]
df_attributes.to_csv('BB_attributes_1.csv')

df_flavors = pd.DataFrame(flavors_dict).transpose()
df_flavors.reset_index(level=0, inplace=True)
df_flavors=df_flavors.rename(columns = {'index':'id'})
df_flavors.to_csv('BB_flavors_1.csv')

df_cuisines = pd.DataFrame(_cuisines).transpose()
df_cuisines.reset_index(level=0, inplace=True)
df_cuisines=df_cuisines.rename(columns = {'index':'id'})
df_cuisines.to_csv('BB_cuisines_1.csv')

df_details=pd.DataFrame(recipe_details)
cols = list(df_details)
cols.insert(0, cols.pop(cols.index('id')))
df_details=df_details.ix[:,cols]
df_details.to_csv('BB_details_1.csv')

In [71]:
df_ingredients.sum(axis=0).sort_values(ascending = False)


Out[71]:
id                             Breakfast-Casserole-1549257Blueberry-Breakfast...
eggs                                                                         255
salt                                                                         223
milk                                                                         146
baking powder                                                                110
cinnamon                                                                     100
butter                                                                        83
vanilla extract                                                               79
sugar                                                                         75
large eggs                                                                    74
pepper                                                                        65
water                                                                         53
flour                                                                         52
maple syrup                                                                   51
bananas                                                                       49
vanilla                                                                       48
honey                                                                         42
all-purpose flour                                                             38
baking soda                                                                   35
ground cinnamon                                                               33
olive oil                                                                     33
rolled oats                                                                   31
chia seeds                                                                    29
coconut oil                                                                   27
brown sugar                                                                   27
sea salt                                                                      27
unsalted butter                                                               25
onions                                                                        25
strawberries                                                                  25
buttermilk                                                                    24
                                                     ...                        
liquid smoke                                                                   1
gruyere cheese                                                                 1
ground hazelnuts                                                               1
gluten                                                                         1
grated Monterey Jack cheese                                                    1
gluten free blend                                                              1
gluten-free baking powder                                                      1
gluten-free granola                                                            1
gluten-free oats                                                               1
sweet pepper                                                                   1
goat cheese                                                                    1
granny smith apples                                                            1
soy                                                                            1
vegan English muffins                                                          1
grape jelly                                                                    1
grass-fed butter                                                               1
grated nutmeg                                                                  1
vanilla flavoring                                                              1
grated orange                                                                  1
gravy mix                                                                      1
vanilla yogurt                                                                 1
green beans                                                                    1
green bell pepper                                                              1
green chile                                                                    1
greens                                                                         1
grits                                                                          1
ground allspice                                                                1
ground almonds                                                                 1
vanilla powder                                                                 1
glutenfree vanilla                                                             1
dtype: object

In [72]:
df_ingredients.head()


Out[72]:
id course active dry yeast agave nectar aged cheddar cheese all-purpose flour allspice almond butter almond extract almond flour ... whole wheat tortillas whole wheat white flour wild rice worcestershire sauce yeast yellow onion yellow peppers yellow squash yoghurt zucchini
0 Baked-French-Toast-Casserole-1636754 Breakfast and Brunch 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
1 Coconut-Flour-Pancakes-1638026 Breakfast and Brunch 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
2 Vegan-Coconut-Waffles-_for-Mama-_-Babe_-1702323 Breakfast and Brunch 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
3 Whole-wheat-pancakes-_new-and-improved_-352121 Breakfast and Brunch 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
4 Blueberry-Oatmeal-Breakfast-Bars-1701314 Breakfast and Brunch 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0

5 rows × 749 columns


In [123]:
BB = pd.read_csv('BB_ingredients.csv')

In [124]:
BB.head()


Out[124]:
Unnamed: 0 id 2% reduced-fat milk Chobani Yogurt Crunch Cereal English muffins Himalayan salt Honeysuckle White® Turkey Breakfast Sausage Patties Jarlsberg KRAFT Shredded Pepper Jack Cheese with a TOUCH OF PHILADELPHIA ... whole wheat flour whole wheat pastry flour whole wheat tortillas whole wheat white flour wild rice yellow cornmeal yellow onion yellow squash yoghurt zucchini
0 0 Raspberry-Melon-Breakfast-Bowls-1640967 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
1 1 Baked-Egg-In-Avocado-1686638 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
2 2 The-28-Day-Shrink-Your-Stomach-Challenge-Break... 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
3 3 Vanilla-Peach-Overnight-Oats-1706871 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
4 4 Old-Fashioned-Pancakes-1639238 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0

5 rows × 769 columns


In [101]:
data=pd.concat([BB, df_ingredients],join='outer', axis=0, ignore_index=True)


//anaconda/lib/python2.7/site-packages/pandas/indexes/base.py:2028: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
  indexer = self._engine.get_indexer(target._values)

In [104]:
type(df_ingredients)


Out[104]:
pandas.core.frame.DataFrame

In [102]:
data


//anaconda/lib/python2.7/site-packages/pandas/indexes/base.py:1229: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
  return key in self._engine
Out[102]:
2% reduced-fat milk Chobani Yogurt Crunch Cereal English muffins Himalayan salt Honeysuckle White® Turkey Breakfast Sausage Patties Jarlsberg KRAFT Shredded Pepper Jack Cheese with a TOUCH OF PHILADELPHIA KRAFT Shredded Sharp Cheddar Cheese Kraft Grated Parmesan Cheese ... whole wheat white flour wild rice worcestershire sauce yeast yellow cornmeal yellow onion yellow peppers yellow squash yoghurt zucchini
0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 NaN NaN 0.0 0.0 NaN 0.0 0.0 0.0
1 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 NaN NaN 0.0 0.0 NaN 0.0 0.0 0.0
2 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 NaN NaN 0.0 0.0 NaN 0.0 0.0 0.0
3 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 NaN NaN 0.0 0.0 NaN 0.0 0.0 0.0
4 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 NaN NaN 0.0 0.0 NaN 0.0 0.0 0.0
5 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 NaN NaN 0.0 0.0 NaN 0.0 0.0 0.0
6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 NaN NaN 0.0 0.0 NaN 0.0 0.0 0.0
7 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 NaN NaN 0.0 0.0 NaN 0.0 0.0 0.0
8 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 NaN NaN 0.0 0.0 NaN 0.0 0.0 0.0
9 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 NaN NaN 0.0 0.0 NaN 0.0 0.0 0.0
10 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 NaN NaN 0.0 0.0 NaN 0.0 0.0 0.0
11 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 NaN NaN 0.0 0.0 NaN 0.0 0.0 0.0
12 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 NaN NaN 0.0 0.0 NaN 0.0 0.0 0.0
13 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 NaN NaN 0.0 0.0 NaN 0.0 0.0 0.0
14 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 NaN NaN 0.0 0.0 NaN 0.0 0.0 0.0
15 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 NaN NaN 0.0 0.0 NaN 0.0 0.0 0.0
16 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 NaN NaN 0.0 0.0 NaN 0.0 0.0 0.0
17 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 NaN NaN 0.0 0.0 NaN 0.0 0.0 0.0
18 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 NaN NaN 0.0 0.0 NaN 0.0 0.0 0.0
19 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 NaN NaN 0.0 0.0 NaN 0.0 0.0 0.0
20 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 NaN NaN 0.0 0.0 NaN 0.0 1.0 0.0
21 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 NaN NaN 0.0 0.0 NaN 0.0 0.0 0.0
22 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 NaN NaN 0.0 0.0 NaN 0.0 0.0 0.0
23 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 NaN NaN 0.0 0.0 NaN 0.0 0.0 0.0
24 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 NaN NaN 0.0 0.0 NaN 0.0 0.0 0.0
25 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 NaN NaN 0.0 0.0 NaN 0.0 0.0 0.0
26 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 NaN NaN 0.0 0.0 NaN 0.0 0.0 0.0
27 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 NaN NaN 0.0 0.0 NaN 0.0 0.0 0.0
28 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 NaN NaN 0.0 0.0 NaN 0.0 0.0 0.0
29 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 NaN NaN 0.0 0.0 NaN 0.0 0.0 0.0
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
970 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
971 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
972 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
973 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
974 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
975 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
976 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
977 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
978 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
979 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
980 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
981 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
982 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
983 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
984 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
985 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
986 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
987 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
988 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
989 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN 1.0 NaN
990 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
991 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
992 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
993 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
994 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
995 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
996 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
997 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
998 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
999 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ... NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN

1000 rows × 1053 columns


In [111]:
for i in df_ingredients.columns:
    if 'English' in i:
        print i


English muffins
vegan English muffins

In [ ]: