'line() got an unexpected keyword argument 'reuse_plot'. Not sure what this means

I am following a tutorial online to use Python to determine financial returns. I am getting an error "TypeError: line() got an unexpected keyword argument 'reuse_plot'" when I am following the video content. I am very new to Python and I really do not understand why.

Here is the total code:

import datetime as dt
import pandas as pd
import numpy as np
import pylab
import seaborn as sns
import scipy.stats as stats 
from pandas_datareader import data as pdr
import plotly.offline as pyo

pyo.init_notebook_mode(connected=True)
pd.options.plotting.backend = 'plotly'

end = dt.datetime.now()
start = dt.datetime(2018,1,1)

df = pdr.get_data_yahoo('CBA.AX', start, end)
df.Close.plot()


Solution 1:[1]

This error occurs due to conflicts between pandas and plotly packages. I could solve it by upgrading the pandas to the latest version (I can confirm that for pandas==1.3.5 and plotly==5.7.0, the error is not generated anymore).

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Pandula P