application_vnd.jupyter.stderr_output_1.png
import pandas as pd

life = pd.read_csv('/kaggle/input/life-expectancy-who-updated/Life-Expectancy-Data-Updated.csv')

life[['Adult_mortality', 'Infant_deaths', 'Under_five_deaths']] = life[['Adult_mortality', 'Infant_deaths', 'Under_five_deaths']] / 10

groupyears = life.groupby('Year')['Country'].value_counts()
print(groupyears)
groupyears = groupyears.unstack()
print(groupyears)
missing_country = []
for index, rows in groupyears.iterrows():
    for col in groupyears.columns:
        if groupyears.loc[index, col] != 1:
            missing_country.append([index, col])
        else:
            None
print('Positions in dataframe where have missing country in each year : ', missing_country)