Skip to content

Commit

Permalink
Messing around
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob Miller committed Apr 8, 2019
1 parent 5448041 commit 4665f59
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
14 changes: 13 additions & 1 deletion Kaggle-Adverse_Food_Events/Kaggle-Adverse_Food_Events.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,16 @@
industry_counts[industry_counts_gt_200])
plt.title('Industry with Greater Than 200 Counts')
plt.xticks(rotation = 'vertical')
plt.show()
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]))
4 changes: 4 additions & 0 deletions Kaggle-US_Healthcare_Data/Kaggle-US_Healthcare_Data.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@
@author: Jake
"""

import numpy as np
import pandas as pd

df = pd.read_csv('Nutritions_US.csv', encoding = 'cp1252')

0 comments on commit 4665f59

Please sign in to comment.