diff --git a/SystemCode/knowledgeDiscovery/cuisines_kmeans v5.py b/SystemCode/knowledgeDiscovery/cuisines_kmeans v5.py index 381280a..8c689fa 100644 --- a/SystemCode/knowledgeDiscovery/cuisines_kmeans v5.py +++ b/SystemCode/knowledgeDiscovery/cuisines_kmeans v5.py @@ -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