diff --git a/Kaggle-Adverse_Food_Events/Kaggle-Adverse_Food_Events.py b/Kaggle-Adverse_Food_Events/Kaggle-Adverse_Food_Events.py index 33f713b..5ff528f 100644 --- a/Kaggle-Adverse_Food_Events/Kaggle-Adverse_Food_Events.py +++ b/Kaggle-Adverse_Food_Events/Kaggle-Adverse_Food_Events.py @@ -29,4 +29,16 @@ industry_counts[industry_counts_gt_200]) plt.title('Industry with Greater Than 200 Counts') plt.xticks(rotation = 'vertical') -plt.show() \ No newline at end of file +plt.show() + +print('\n--- Industry with most AE ---\n' + \ + industry[np.argmax(industry_counts)]) + +product, product_counts = np.unique(df['PRI_Reported Brand/Product Name'], + return_counts = True) +top_products = [[product_counts[i], product[i]] for i in range(len(product))] + +print('\n--- Top 10 Products with Most AE ---' + \ + '\n-Note: number 1 product is Redacted-') +[print(i) for i in sorted(top_products, reverse = True)[1:11]] +# str(sorted(top_products, reverse = True)[1:11])) \ No newline at end of file diff --git a/Kaggle-US_Healthcare_Data/Kaggle-US_Healthcare_Data.py b/Kaggle-US_Healthcare_Data/Kaggle-US_Healthcare_Data.py index cb43a87..5e6868c 100644 --- a/Kaggle-US_Healthcare_Data/Kaggle-US_Healthcare_Data.py +++ b/Kaggle-US_Healthcare_Data/Kaggle-US_Healthcare_Data.py @@ -6,3 +6,7 @@ @author: Jake """ +import numpy as np +import pandas as pd + +df = pd.read_csv('Nutritions_US.csv', encoding = 'cp1252') \ No newline at end of file