Search code examples
python-3.xpandaspandas-datareader

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


I have seen several of these questions along with some answers about it all however either I'm super dumb and can't work out what they are meaning or I'm just extremely dumb and I'm doing it wrong

I am getting this warning using Pandas and Pandas_datareader

"You may find the 'util.testing' code in pandas_datareader, which is separate from pandas."

This is one of the answers I have seen and I don't understand how to fix it I don't have any code that has 'until.testing' it so I don't know to remove it when it's not there and adding it did nothing but due to the warning, my program won't work on my raspberry pi which is the intended location.

please help


Solution

  • It is a warning, it should not prevent your program to run properly. However, it is true that it uglifies the console output. If you want to suppress the warning adding the following lines to the imports of your program will do the job (as suggested here):

    import warnings
    warnings.simplefilter(action='ignore', category=FutureWarning)
    

    Hope it helps.