text_plain_output_1.png image_output_1.png
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

df = pd.read_csv('../input/pm25-mean-annual-exposure/PM25_MAE.csv', index_col=0)

df = df.drop(['Country Code', 'Indicator Name', 'Indicator Code'], axis=1)
df = df.dropna(thresh=10, axis=1)
before = df.shape[0]
na_free = df.dropna(thresh=10, axis=0)
only_na = df[~df.index.isin(na_free.index)]
after = na_free.shape[0]
namelist = only_na.index

df = na_free.transpose()

import matplotlib.pyplot as plt
import datetime as dt

#fetch the latest data for all countries
latest = df.tail(1).transpose()
latest

latest['2017'].plot(kind='pie')