Skip to content

Commit

Permalink
Update cuisines_kmeans v5.py
Browse files Browse the repository at this point in the history
Corrected typo
  • Loading branch information
eleow committed Sep 22, 2019
1 parent 53d9e52 commit eec3ec9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion SystemCode/knowledgeDiscovery/cuisines_kmeans v5.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

data = pd.read_excel('FoodDatabase v1.8.xlsx', sheet_name='AllFood-FoodType')
data = data[(data['Cuisine'].isin(['chinese', 'malay', 'indian', 'western']) & (data['Opta Type'] == 'Main') & (data['Analysis'] == 1))]
data = data.drop(['Analysis', 'MealPanner', 'HasBeef', 'IsCaffeinated', 'Multiplier', 'Carbohydrates %', 'Protein %', 'Fats %'], axis=1)
data = data.drop(['Analysis', 'MealPlanner', 'HasBeef', 'IsCaffeinated', 'Multiplier', 'Carbohydrates %', 'Protein %', 'Fats %'], axis=1)
data['weight'] = data['Per Serving Household Measure'].str.extract('.*?(\(([0-9]*?) g\))')[1].astype('float')
data.describe()
data['pct_protein'] = data['Protein (g)'] * 4 / data['Energy'] * 100
Expand Down

0 comments on commit eec3ec9

Please sign in to comment.