Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created November 9, 2020 06:31
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save amankharwal/ad69f30ccc8cd05443d32c9eaf3f9803 to your computer and use it in GitHub Desktop.
import numpy as np # linear algebra
import pandas as pd # data processing
import matplotlib.pyplot as plt
food_data=pd.read_csv("FoodFacts.csv",low_memory=False)
#Searching for manufacturers which use plastic stuffs for packing food
df=food_data[['manufacturing_places','packaging_tags']][(food_data['packaging_tags']=='plastique')|(food_data['packaging_tags']=='plastic')]
df=df.dropna()
print(df.head(20))
#Calculating which country uses what extent of platic stuffs
data=df['manufacturing_places'].value_counts(sort=True,dropna=False)
print(data.head(10))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment