LoginSignup
45

More than 5 years have passed since last update.

Jupyter Notebookで実行に影響のない警告(ワーニング)を非表示にする方法

Last updated at Posted at 2016-12-16

はじめに

Jupyter Notebookで原因不明のエラーのような警告が表示されるようになって、でも結果には何の影響もない警告で、どうにかしようとあくせくするも表示を消せない時に「臭いものには蓋をする」方法です(-_-;)

サンプルコード

以下のコードを警告(ワーニング)が発生する前に記述します。

import warnings
warnings.filterwarnings('ignore')

警告が表示されなくなった!!
...あとで必ずきちんと直すぞ、きっと、たぶん、いつか(^_^;)

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
45