Plot the 14-day moving average of the daily change in new COVID-19 cases in
Brazil, China, India, Italy, Spain, and the USA:
a) First, use the diff() method that was introduced in the Working with time
series data section of Chapter 4, Aggregating Pandas DataFrames, to calculate the
day-over-day change in new cases. Then, use rolling() to calculate the 14-day
moving average.
b) Make three subplots: one for China; one for Spain and Italy; and one for Brazil,
India, and the USA.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here