Learning Scientific Programming with Python (2nd edition)

P9.3.1: Tuberculosis rates by state in the USA

Question P9.3.1

Use pandas to read in the file, tb-cases.txt, which provides numbers of cases of tuberculosis in the USA, broken down by state for the years 1993–2018. Create a DataFrame with a hierarchical index (MultiIndex) consisting of the state name and year.

Plot these data appropriately and determine the state with the greatest relative decrease in tuberculosis over the time period considered.