pythonpandaswarningssuppress-warningsfuture-warning

How to suppress Pandas Future warning?


When I run the program, Pandas gives 'Future warning' like below every time.

D:\Python\lib\site-packages\pandas\core\frame.py:3581: 
FutureWarning: rename with inplace=True  will return None from pandas 0.11 onward
  " from pandas 0.11 onward", FutureWarning) 

I got the message, but I just want to stop Pandas showing such message again and again. Is there any builtin parameter that I can set to make Pandas stop popping up the 'Future warning'?


Solution

  • Found this on github...

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