How to disable python warnings?

前端 未结 8 1017
醉梦人生
醉梦人生 2020-11-22 04:24

I am working with code that throws a lot of (for me at the moment) useless warnings using the warnings library. Reading (/scanning) the documentation I only found a way to d

8条回答
  •  粉色の甜心
    2020-11-22 04:42

    If you don't want something complicated, then:

    import warnings
    warnings.filterwarnings("ignore", category=FutureWarning)
    

提交回复
热议问题