import matplotlib.pylab as plt

import pandas as pd

country = 'Philippines'

df = pd.read_csv('../input/attacks_data_UTF8.csv', encoding='latin1', parse_dates=['Date'], infer_datetime_format=True, index_col=1)

if country is not None:
    dfc = df.loc[df['Country'] == country]
else:
    dfc = df

country_rank = df.Country.value_counts().rank(numeric_only=True, ascending=False).loc[country]
country_attacks = df.Country.value_counts()[country]
country_killed = dfc.Killed.sum()
country_injured = dfc.Injured.sum()

dfc.City.value_counts().plot(kind='bar', figsize=(17, 7))
plt.title('Number of attacks by city')