warnings.simplefilter('ignore') code example
Example 1: python suppress warnings in function
import warnings
warnings.filterwarnings("ignore")
Example 2: ignoring warnings
import warnings
warnings.filterwarnings(action= 'ignore')
import warnings
warnings.filterwarnings("ignore")
import warnings
warnings.filterwarnings(action= 'ignore')