Using Python Jupyter Notebook, Make a function fertility_over_time that takes the Alpha-3 code of a country and a start year. It returns a two-column table with labels "Year" and "Children per woman" that can be used to generate a line chart of the country's fertility rate each year, starting at
the start year. The plot should include the start year and all later years that appear in the fertility table.
Then, in the next cell, call your fertility_over_time function on the Alpha-3 code for Bangladesh and the year 1970 in order to plot how Bangladesh's fertility rate has changed since 1970. Note that the function fertility_over_time should not return the plot itself The expression that draws the line plot is provided for you; please don't change it.
In [ ]:
def fertility_over_time(country, start):
"""Creat a two-column table that describes a country's total fertility rate each year."""
country_fertility = ...
country_fertility_after_start = ...
In [ ]:
bangladesh_code = ...
fertility_over_time(bangladesh_code, 1970).plot(0, 1) # You should *not* change this line.
In [ ]:
Recently Asked Questions
- So for the company Toyota, what would be some competitive strategies that could help them maximize their profits in the long run. Also what market structure
- mean 35 and a standard deviation of 4. what is the percentage of potholes between 31 and 47?___________
- How much X and Y should the consumer purchase in order to maximize her utility and how much total utility the consumer receive ; What is the new bundle ?