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()
print('%s is ranked %.0f with %d attacks resulting to %d deaths and %d injuries' % (country, country_rank, country_attacks, country_killed, country_injured))