Fix Python – How to suppress Pandas Future warning ?

Question

Asked By – bigbug

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 msg, but I just want to stop Pandas showing such msg again and again, is there any buildin parameter that I can set to let Pandas not pop up the ‘Future warning’ ?

Now we will see solution for issue: How to suppress Pandas Future warning ?


Answer

Found this on github

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

import pandas

This question is answered By – bdiamante

This answer is collected from stackoverflow and reviewed by FixPython community admins, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0