Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created Nov 9, 2020
Embed
What would you like to do?
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