Deprecation Error

Screen Link:

My Code:

import pandas as pd
import matplotlib.pyplot as plt

death_toll = pd.read_csv('covid_avg_deaths.csv')

fig, (ax1, ax2, ax3, ax4) = plt.subplots(nrows=4, ncols=1,
axes = [ax1, ax2, ax3, ax4]
for ax in axes:
    ax.plot(death_toll['Month'], death_toll['New_deaths'],
            color='#b00b1e', alpha=0.1)
    ax.tick_params(bottom=0, left=0) 
    for location in ['left', 'right', 'top', 'bottom']:

ax1.plot(death_toll['Month'][:3], death_toll['New_deaths'][:3],
         color='#b00b1e', linewidth=2.5)
ax2.plot(death_toll['Month'][2:6], death_toll['New_deaths'][2:6],
         color='#b00b1e', linewidth=2.5)
ax3.plot(death_toll['Month'][5:10], death_toll['New_deaths'][5:10],
         color='#b00b1e', linewidth=2.5)
ax4.plot(death_toll['Month'][9:12], death_toll['New_deaths'][9:12],
         color='#b00b1e', linewidth=2.5)

What I expected to happen:
Code to run

What actually happened:

/dataquest/system/env/python3/lib/python3.8/site-packages/plotly/matplotlylib/ MatplotlibDeprecationWarning:

The is_frame_like function was deprecated in Matplotlib 3.1 and will be removed in 3.3.

This is preventing from completing the entire course on Storytelling Data Visualization

Weird, I don’t get that warning when I run your code on the platform.

It’s still just a Warning and not an Error, so it shouldn’t interfere with your progress. What probably isn’t exactly causing you right now?

Thank you for your prompt response

I tried again and it is working without displaying an error message. However this is not the first time this happens to me when using matplotlib in the platform, do you have any suggestions how I can overcome this error if it may arise in the future?

As I said, this is not an error message. Just a warning and shouldn’t interfere with your progress.

If it reappears AND it causes you to not progress with the content, then you can use the ? in the top-right corner of the Mission Step page to report it to DataQuest. Sharing some screenshots with them of the message as it appears might help them as well to figure out the issue.

I am now having this problem. What exactly was the solution?

“AttributeError: ‘list’ object has no attribute ‘tolist’” - this error comes up anytime I try to execute

Please create a separate post for your issue and make sure to include all relevant details. These guidelines should help you create the question.