get_life_expectancy#
- class get_life_expectancy(location=None, by_sex=True, overall=False)[source]#
Load life expectancy by age for a given country or countries.
- Parameters:
location (str or list) – name of the country or countries to load the age distribution for
by_sex (bool) – whether to rates by sex
overall (bool) – whether to load total rate
- Returns:
life expectancy by age and sex
- Return type:
life_expectancy (dict)