Solve the error when importing pandas_datareader: FutureWarning: pandas.util.testing is deprecated.

An error is reported when importing the pandas_datareader library, and the screenshot of the error is as follows

According to the above error message, find: D:\software\python\Lib\site-packages\pandas_datareader\compat\__init__.py file, and change the seventh line to pandas.testing:

Then import as normal:

Related Posts