Pandas-datareader: FutureWarning: pandas.util.testing is deprecated. Use the functions in the public API at pandas.testing instead.

Created on 27 Apr 2020  路  10Comments  路  Source: pydata/pandas-datareader

import pandas as pd 
import pandas_datareader as pdr 
import numpy as np 

Reports the following error in the terminal (VS Code)

C:\Users\frede\Anaconda3\lib\site-packages\pandas_datareader\compat\__init__.py:7: FutureWarning: pandas.util.testing is deprecated. Use the functions in the public API at pandas.testing instead.
  from pandas.util.testing import assert_frame_equal

Most helpful comment

I had the same issue. Resolved it.

Just open in editor
C:\Users\Amber\AppData\Local\Programs\Python\Python37\Libsite-packages\pandas_datareader\compat__init__.py

Replace:

from pandas.util.testing import assert_frame_equal

with

from pandas.testing import assert_frame_equal

All 10 comments

I have the same problem! I didn麓t find solution yet!

same

This is a warning, not an error.

Same here. I'm not even using pandas.util.testing in my code

same issue without using pandas.util.testing, but only from time to time when the notebook runs (not having changed anything); warnings.filterwarnings("ignore") is set

I had the same issue. Resolved it.

Just open in editor
C:\Users\Amber\AppData\Local\Programs\Python\Python37\Libsite-packages\pandas_datareader\compat__init__.py

Replace:

from pandas.util.testing import assert_frame_equal

with

from pandas.testing import assert_frame_equal

Fixed

from pandas.util.testing import assert_frame_equal

replace to

from pandas.testing import assert_frame_equal

Fixed in the most recent release so upgrade.

import
pandas._testing
as tm;

Was this page helpful?
0 / 5 - 0 ratings

Related issues

paintdog picture paintdog  路  7Comments

allenwu25 picture allenwu25  路  9Comments

hmz123 picture hmz123  路  6Comments

walsha2 picture walsha2  路  5Comments

waswaswas10 picture waswaswas10  路  7Comments